self.__class__
produces a type check with a constructor where a concrete reference to the class works fine
#18279
Labels
Bug Report
I'm not sure how this bug generalizes, but I discovered this with an HTTP headers abstraction with a
clone
method and the example minifies pretty far down, as shown belowTo Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=0be4308fb57a3685fafab2ac51a97c85
Expected Behavior
No errors.
Actual Behavior
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: