-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
The file example.py includes the following:
import subprocess
subprocess.Popen(example=True)
There is no mypy config file.
The following error is given:
(e2e) Adam@Adams-MacBook-Pro ~/Desktop> mypy example.py --show-traceback
example.py:2: error: Unexpected keyword argument "example" for "Popen"
example.py:2: error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues version: 0.511
Traceback (most recent call last):
File "/Users/Adam/.virtualenvs/e2e/bin/mypy", line 6, in <module>
main(__file__)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/main.py", line 46, in main
res = type_check_only(sources, bin_dir, options)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/main.py", line 93, in type_check_only
options=options)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/build.py", line 188, in build
graph = dispatch(sources, manager)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/build.py", line 1595, in dispatch
process_graph(graph, manager)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/build.py", line 1838, in process_graph
process_stale_scc(graph, scc, manager)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/build.py", line 1937, in process_stale_scc
graph[id].type_check_first_pass()
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/build.py", line 1510, in type_check_first_pass
self.type_checker.check_first_pass()
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/checker.py", line 177, in check_first_pass
self.accept(d)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/checker.py", line 264, in accept
stmt.accept(self)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/nodes.py", line 825, in accept
return visitor.visit_expression_stmt(self)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/checker.py", line 1823, in visit_expression_stmt
self.expr_checker.accept(s.expr, allow_none_return=True)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/checkexpr.py", line 2054, in accept
typ = self.visit_call_expr(node, allow_none_return=True)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/checkexpr.py", line 201, in visit_call_expr
ret_type = self.check_call_expr_with_callee_type(callee_type, e)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/checkexpr.py", line 341, in check_call_expr_with_callee_type
e.arg_names, callable_node=e.callee)[0]
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/checkexpr.py", line 396, in check_call
arg_names, formal_to_actual, context, self.msg)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/checkexpr.py", line 759, in check_argument_count
callee, actual_names[i], context)
File "/Users/Adam/.virtualenvs/e2e/lib/python3.6/site-packages/mypy/messages.py", line 619, in unexpected_keyword_argument
path = self.modules[module_name].path
KeyError: 'subprocess.Popen'
example.py:2: note: use --pdb to drop into pdb
Further system info:
(e2e) Adam@Adams-MacBook-Pro ~/Desktop> mypy --version
mypy 0.511
(e2e) Adam@Adams-MacBook-Pro ~/Desktop> python
Python 3.6.0 (default, Mar 4 2017, 12:32:34)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>