isinstance(x, CallableType) and x.is_type_object()
is a code smell
#12320
Labels
bug
mypy got something wrong
refactoring
Changing mypy's internals
topic-developer
Issues relevant to mypy developers
While fixing #12319 I noticed that if you grep for
is_type_object
, there are several instances where only CallableTypes are handled. Presumably, these all do the wrong thing for types with overloaded__new__
.The text was updated successfully, but these errors were encountered: