You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(and that __new__ is not considered is_method = True)
To Reproduce
classC:
def__new__(cls):
returncls()
c=C()
Expected Behavior
probably () -> C or () -> Self ?
Actual Behavior
$ dmypy run t.pyDaemon startedSuccess: no issues found in 1 source file
$ dmypy suggest t.C.__new__Daemon crashed!Traceback (most recent call last): File "mypy/dmypy_server.py", line 237, in serve File "mypy/dmypy_server.py", line 286, in run_command File "mypy/dmypy_server.py", line 983, in cmd_suggest File "mypy/suggestions.py", line 267, in suggest File "mypy/suggestions.py", line 480, in get_suggestion File "mypy/suggestions.py", line 404, in get_guesses File "mypy/suggestions.py", line 350, in get_argsIndexError: list index out of range
Your Environment
Mypy version used: 1.15.0
Mypy command-line flags: see above
Mypy configuration options from mypy.ini (and other config files): n/a
Python version used: 3.13.1
The text was updated successfully, but these errors were encountered:
Bug Report
a crash occurs when requesting suggestions for
__new__
with no args and a callerjust a guess at the line since I haven't poked it yet -- I think the problem is here:
mypy/mypy/suggestions.py
Line 350 in 1ea9373
__new__
is not consideredis_method = True
)To Reproduce
Expected Behavior
probably
() -> C
or() -> Self
?Actual Behavior
Your Environment
mypy.ini
(and other config files): n/aThe text was updated successfully, but these errors were encountered: