basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

nonsense error `"object & type" has no attribute "__init__"`

Open DetachHead opened this issue 9 months ago • 0 comments

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

DetachHead avatar Feb 17 '25 07:02 DetachHead