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
{{ message }}
Repository navigation
__init_subclass__ with classmethod raises IndexError in stubtest #15397
init subclass
Traceback (most recent call last):
File "D:\RayChen\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\RayChen\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 1879, in <module>
sys.exit(main())
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 1875, in main
return test_stubs(parse_options(sys.argv[1:]))
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 1748, in test_stubs
for error in test_module(module):
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 218, in test_module
yield from verify(stub, runtime, [module_name])
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 396, in verify_mypyfile
yield from verify(stub_entry, runtime_entry, object_path + [entry])
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 534, in verify_typeinfo
yield from verify(stub_to_verify, runtime_attr, object_path + [entry])
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 1254, in verify_decorator
yield from verify(func, runtime, object_path)
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 974, in verify_funcitem
stub_sig = Signature.from_funcitem(stub)
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 730, in from_funcitem
stub_args = maybe_strip_cls(stub.name, stub.arguments)
File "D:\RayChen\Programs\Python\Python310\lib\site-packages\mypy\stubtest.py", line 674, in maybe_strip_cls
if args[0].variable.name == "cls":
IndexError: list index out of range
Your Environment
Mypy version used: 1.3.0
Mypy command-line flags: None
Mypy configuration options from mypy.ini (and other config files): None
Activity
hauntsaninja commentedon Jun 8, 2023
Thanks for the report!