basedmypy
basedmypy copied to clipboard
nonsense error `"object & type" has no attribute "__init__"`
def asdf(obj: object):
if callable(obj) and isinstance(obj, type):
obj.__init__ # error: "object & type" has no attribute "__init__" [attr-defined]
https://mypy-play.net/?mypy=basedmypy-latest&python=3.13&gist=c3c085c7c087ebe075d71dda0f822dee