Technologicat / pyan

Static call graph generator. The official Python 3 version. Development repo.
GNU General Public License v2.0
324 stars 57 forks source link

Enh: static type annotations #2

Open Technologicat opened 6 years ago

Technologicat commented 6 years ago

Trying to analyze code that uses static type annotations (specifically PEP 526) crashes Pyan.

This is due to a bug in analyzer.py; an AnnAssign AST node has a format different from a regular Assign node, but CallGraphVisitor currently does not know this.

Issue reported by and minimal example courtesy of @AgenttiX.

pyan_err.zip

Technologicat commented 6 years ago

Requires Python 3.6, waiting to upgrade to be able to debug this.

Technologicat commented 6 years ago

Not closed yet - need testing.