Skip to content

Commit

Permalink
[typing] Make the runtime_typing.checked always typed
Browse files Browse the repository at this point in the history
  • Loading branch information
justinchuby committed Jul 19, 2024
1 parent 2401de4 commit 234858f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion onnxscript/_internal/runtime_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
T = typing.TypeVar("T", bound=typing.Callable[..., typing.Any])

try:
from beartype import beartype as checked
from beartype import beartype as _beartype_decorator
from beartype import roar as _roar

checked = typing.cast(typing.Callable[[T], T], _beartype_decorator)

# Beartype warns when we import from typing because the types are deprecated
# in Python 3.9. But there will be a long time until we can move to using
# the native container types for type annotations (when 3.9 is the lowest
Expand Down

0 comments on commit 234858f

Please sign in to comment.