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
mypy --enable-incomplete-feature=TypeVarTuple --enable-incomplete-feature=Unpack --show-traceback demo.py
demo.py:13: error: Type signature has too few arguments [misc]
demo.py:18: error: More than one Unpack in a type is not allowed [misc]
demo.py:13: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.7.0+dev.838a1d4be1f3cad230d028b0e9cb8e1fb7a4fa5b
Traceback (most recent call last):
File "/home/graingert/.virtualenvs/testing311/bin/mypy", line 8, in <module>
sys.exit(console_entry())
File "/home/graingert/projects/mypy/mypy/__main__.py", line 15, in console_entry
main()
File "/home/graingert/projects/mypy/mypy/main.py", line 99, in main
res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
File "/home/graingert/projects/mypy/mypy/main.py", line 178, in run_build
res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
File "/home/graingert/projects/mypy/mypy/build.py", line 189, in build
result = _build(
File "/home/graingert/projects/mypy/mypy/build.py", line 262, in _build
graph = dispatch(sources, manager, stdout)
File "/home/graingert/projects/mypy/mypy/build.py", line 2938, in dispatch
process_graph(graph, manager)
File "/home/graingert/projects/mypy/mypy/build.py", line 3336, in process_graph
process_stale_scc(graph, scc, manager)
File "/home/graingert/projects/mypy/mypy/build.py", line 3431, in process_stale_scc
mypy.semanal_main.semantic_analysis_for_scc(graph, scc, manager.errors)
File "/home/graingert/projects/mypy/mypy/semanal_main.py", line 94, in semantic_analysis_for_scc
process_functions(graph, scc, patches)
File "/home/graingert/projects/mypy/mypy/semanal_main.py", line 252, in process_functions
process_top_level_function(
File "/home/graingert/projects/mypy/mypy/semanal_main.py", line 291, in process_top_level_function
deferred, incomplete, progress = semantic_analyze_target(
File "/home/graingert/projects/mypy/mypy/semanal_main.py", line 349, in semantic_analyze_target
analyzer.refresh_partial(
File "/home/graingert/projects/mypy/mypy/semanal.py", line 606, in refresh_partial
self.accept(node)
File "/home/graingert/projects/mypy/mypy/semanal.py", line 6536, in accept
node.accept(self)
File "/home/graingert/projects/mypy/mypy/nodes.py", line 776, in accept
return visitor.visit_func_def(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/graingert/projects/mypy/mypy/semanal.py", line 841, in visit_func_def
self.analyze_func_def(defn)
File "/home/graingert/projects/mypy/mypy/semanal.py", line 902, in analyze_func_def
defn.type = set_callable_name(defn.type, defn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/graingert/projects/mypy/mypy/semanal_shared.py", line 268, in set_callable_name
return sig.with_name(fdef.name)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/graingert/projects/mypy/mypy/types.py", line 1955, in with_name
return self.copy_modified(ret_type=self.ret_type, name=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/graingert/projects/mypy/mypy/types.py", line 1875, in copy_modified
modified = CallableType(
^^^^^^^^^^^^^
File "/home/graingert/projects/mypy/mypy/types.py", line 1806, in __init__
assert len(arg_types) == len(arg_kinds) == len(arg_names)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError:
demo.py:13: : note: use --pdb to drop into pdb
To Reproduce
(Write what you did to reproduce the crash. Full source code is
appreciated. We also very much appreciate it if you try to narrow the
source down to a small stand-alone example.)
Fixes#16285
I was not sure if it is important to support this, but taking into
account the current behavior is a crash, and that implementation is
quite simple, I think we should do this. Using this opportunity I also
improve related error messages a bit.
Crash Report
running with the following input:
Traceback
To Reproduce
(Write what you did to reproduce the crash. Full source code is
appreciated. We also very much appreciate it if you try to narrow the
source down to a small stand-alone example.)
Your Environment
mypy.ini
(and other config files): no config fileThe text was updated successfully, but these errors were encountered: