1.11 Regression: Self
in classmethod causes "type[Self] not callable" error
#17659
Labels
Self
in classmethod causes "type[Self] not callable" error
#17659
Bug Report
A regression bug has been identified in
mypy
version 1.11.1, where the use oftyping.Self
in class method factory functions triggers an error. This issue does not occur inmypy
version 1.10.0. Specifically, attempting to usefunctools.partial
withtyping.Self
results in the error:"type[Self]" not callable
.Description generated using AI.
To Reproduce
t.py
file with the following content down below.mypy t.py
Expected Behavior
No errors.
Actual Behavior
Your Environment
mypy 1.11.1 (compiled: yes)
mypy.ini
(and other config files): N/APython 3.11.7 (main, Dec 25 2023, 16:41:22) [Clang 15.0.0 (clang-1500.1.0.2.5)]
The text was updated successfully, but these errors were encountered: