We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent addcff2 commit 81f6285Copy full SHA for 81f6285
mypy/stubgenc.py
@@ -769,7 +769,11 @@ def get_type_fullname(self, typ: type) -> str:
769
return "Any"
770
typename = getattr(typ, "__qualname__", typ.__name__)
771
module_name = self.get_obj_module(typ)
772
- assert module_name is not None, typ
+ if module_name is None:
773
+ # This should not normally happen, but some types may resist our
774
+ # introspection attempts too hard. See
775
+ # https://github.com/python/mypy/issues/19031
776
+ return "_typeshed.Incomplete"
777
if module_name != "builtins":
778
typename = f"{module_name}.{typename}"
779
return typename
0 commit comments