Skip to content

Commit 4b8001f

Browse files
committed
Never instead of exception.
1 parent 06cf0ed commit 4b8001f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

typemap/type_eval/_eval_operators.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -943,10 +943,7 @@ def _eval_GetSpecialAttr(tp, attr, *, ctx) -> typing.Any:
943943
elif attr.__args__[0] == "__qualname__":
944944
return typing.Literal[tp.__qualname__]
945945
else:
946-
raise TypeError(
947-
f"Invalid type argument to GetSpecialAttr: "
948-
f"{attr} must be one of __name__, __module__, or __qualname__"
949-
)
946+
return typing.Never
950947

951948

952949
@type_eval.register_evaluator(GetAnnotations)

0 commit comments

Comments
 (0)