pyan icon indicating copy to clipboard operation
pyan copied to clipboard

Enh: static type annotations

Open Technologicat opened this issue 6 years ago • 2 comments

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 avatar May 24 '18 12:05 Technologicat

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

Technologicat avatar Jul 19 '18 00:07 Technologicat

Not closed yet - need testing.

Technologicat avatar Jul 19 '18 00:07 Technologicat