Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diamond-lizard/a343dfcaf5c79750fe1e469392924d37 to your computer and use it in GitHub Desktop.
Save diamond-lizard/a343dfcaf5c79750fe1e469392924d37 to your computer and use it in GitHub Desktop.
Output of "mypy -v --show-traceback foo.py"
LOG: Mypy version 0.521
LOG: Metadata not found for foo
LOG: Parsing foo.py (foo)
LOG: Loaded graph with 1 nodes
LOG: Found 1 SCCs; largest has 1 nodes
LOG: Processing SCC singleton (foo) as inherently stale
foo.py: error: Name '__builtins__' is not defined
foo.py:1: error: Name 'int' is not defined
foo.py:1: error: Cannot find module named 'builtins'
foo.py:1: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-imports" flag would help)
foo.py:1: error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues version: 0.521
Traceback (most recent call last):
File "/home/me/.local/bin/mypy", line 11, in <module>
sys.exit(console_entry())
File "/home/me/.local/lib64/python3.4/site-packages/mypy/__main__.py", line 7, in console_entry
main(None)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/main.py", line 50, in main
res = type_check_only(sources, bin_dir, options)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/main.py", line 97, in type_check_only
options=options)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/build.py", line 196, in build
graph = dispatch(sources, manager)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/build.py", line 1801, in dispatch
process_graph(graph, manager)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/build.py", line 2044, in process_graph
process_stale_scc(graph, scc, manager)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/build.py", line 2139, in process_stale_scc
graph[id].semantic_analysis()
File "/home/me/.local/lib64/python3.4/site-packages/mypy/build.py", line 1696, in semantic_analysis
self.manager.semantic_analyzer.visit_file(self.tree, self.xpath, self.options, patches)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/semanal.py", line 295, in visit_file
self.accept(d)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/semanal.py", line 3645, in accept
node.accept(self)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/nodes.py", line 565, in accept
return visitor.visit_func_def(self)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/semanal.py", line 418, in visit_func_def
self.analyze_function(defn)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/semanal.py", line 598, in analyze_function
defn.type = self.type_analyzer().visit_callable_type(defn.type, nested=False)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/typeanal.py", line 333, in visit_callable_type
fallback=t.fallback or self.named_type('builtins.function'),
File "/home/me/.local/lib64/python3.4/site-packages/mypy/typeanal.py", line 545, in named_type
node = self.lookup_fqn_func(fully_qualified_name)
File "/home/me/.local/lib64/python3.4/site-packages/mypy/semanal.py", line 3491, in lookup_fully_qualified
n = self.modules[parts[0]]
KeyError: 'builtins'
foo.py:1: note: use --pdb to drop into pdb
LOG: Build finished in 0.032 seconds with 1 modules, 0 types, and 18 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment