Skip to content

Commit d969157

Browse files
committed
Never instead of exception.
1 parent cb494bc commit d969157

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
@@ -926,10 +926,7 @@ def _eval_GetSpecialAttr(tp, attr, *, ctx) -> typing.Any:
926926
elif attr.__args__[0] == "__qualname__":
927927
return typing.Literal[tp.__qualname__]
928928
else:
929-
raise TypeError(
930-
f"Invalid type argument to GetSpecialAttr: "
931-
f"{attr} must be one of __name__, __module__, or __qualname__"
932-
)
929+
return typing.Never
933930

934931

935932
@type_eval.register_evaluator(GetAnnotations)

0 commit comments

Comments
 (0)