Skip to content

Commit

Permalink
rely on future annotations for union type
Browse files Browse the repository at this point in the history
Signed-off-by: Christian López Barrón <chris.gfz@gmail.com>
  • Loading branch information
chrizzFTD committed Jan 2, 2025
1 parent 17c6bd9 commit b60a4ca
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions grill/cook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
from __future__ import annotations

import types
# https://docs.python.org/3/whatsnew/3.10.html#pep-604-new-type-union-operator
# TODO: Remove when py-3.10+ is supported (for union types)
import typing
import logging
import functools
import itertools
Expand Down Expand Up @@ -109,7 +106,7 @@ def asset_identifier(path: Path | str):
return str(path.relative_to(Repository.get()))


def fetch_stage(identifier: typing.Union[str, UsdAsset], context: Ar.ResolverContext = None, load: Usd.Stage.InitialLoadSet = Usd.Stage.LoadAll) -> Usd.Stage:
def fetch_stage(identifier: str | UsdAsset, context: Ar.ResolverContext = None, load: Usd.Stage.InitialLoadSet = Usd.Stage.LoadAll) -> Usd.Stage:
"""Retrieve the `stage <https://graphics.pixar.com/usd/docs/api/class_usd_stage.html>`_ whose root `layer <https://graphics.pixar.com/usd/docs/api/class_sdf_layer.html>`_ matches the given ``identifier``.
If the `layer <https://graphics.pixar.com/usd/docs/api/class_sdf_layer.html>`_ does not exist, it is created in the repository.
Expand Down

0 comments on commit b60a4ca

Please sign in to comment.