A new codeanalyzer-python release (v0.3.1) is published.
Update the codeanalyzer-python pin in this repo and adapt the
integration to the changes below (see PyCodeanalyzer._run_analyzer).
[0.3.1] - 2026-07-14
Added
- Class-attribute initializers —
PyClassAttribute.initializer captures the assignment RHS (_name = 'account.account' is now recoverable), projected as PyAttribute.initializer (#83).
- Structured call-site arguments —
PyCallsite.arguments: [{ast_kind, inferred_type?}] separates the AST category from the Jedi-inferred type (absent when unknown), projected as PyCallSite.arguments_json (#86).
- Snapshot provenance —
PyApplication.repository {uri, revision, dirty} (git queried read-only at analysis time; absent for non-checkouts) and PyApplication.analyzer {name, version, config}, mirrored as flattened :PyApplication properties (#85).
- Internal import resolution — each
PyImport gains resolved_module (the analyzed target module's file key); resolved imports project as PY_IMPORTS edges to the real :PyModule (one edge per module pair, raw spellings preserved in a spellings array), externals keep :PyPackage, and unresolved relative spellings (., .foo, ..x) no longer mint bogus :PyPackage nodes (#82).
- Neo4j
SCHEMA_VERSION bumped 1.1.0 → 1.2.0 (additive: new properties on PyAttribute, PyCallSite, PyApplication, PY_IMPORTS; PY_IMPORTS may now target :PyModule).
Deprecated
PyCallsite.argument_types (and the PyCallSite.argument_types graph property): it silently mixes AST node categories with inferred type names in one list. Use arguments/arguments_json instead; the legacy field is unchanged and will be removed in schema v2 (#86).
Fixed
- Attribute-call callees (
receiver.method(...)) now resolve to the invoked method instead of the receiver's type — Jedi inference was anchored at the call expression's first character, i.e. the receiver token, so nearly every method call's callee_signature (and the Neo4j PY_RESOLVES_TO edge) pointed at the receiver's class (#80).
PyCallsite.return_type now holds the inferred type of the call result (the callee's inferred return type, or the instance for a constructor call), and is absent when Jedi cannot tell. Previously it held the type inferred at the call expression's start — effectively the receiver's type (#80).
SymbolTableBuilder no longer crashes with ValueError when given a relative project_dir: the path is normalized with os.path.abspath at construction (symlinks intact, matching Jedi's own path normalization) (#90).
- Path-derived fallback signatures no longer corrupt module prefixes containing
.py as a substring (odoo/tools/pycompat.py → odoo.toolscompat): only the terminal .py suffix is stripped, via a single _fallback_signature helper replacing three copies of the buggy expression (#84).
A new
codeanalyzer-pythonrelease (v0.3.1) is published.Update the
codeanalyzer-pythonpin in this repo and adapt theintegration to the changes below (see
PyCodeanalyzer._run_analyzer).[0.3.1] - 2026-07-14
Added
PyClassAttribute.initializercaptures the assignment RHS (_name = 'account.account'is now recoverable), projected asPyAttribute.initializer(#83).PyCallsite.arguments: [{ast_kind, inferred_type?}]separates the AST category from the Jedi-inferred type (absent when unknown), projected asPyCallSite.arguments_json(#86).PyApplication.repository {uri, revision, dirty}(git queried read-only at analysis time; absent for non-checkouts) andPyApplication.analyzer {name, version, config}, mirrored as flattened:PyApplicationproperties (#85).PyImportgainsresolved_module(the analyzed target module's file key); resolved imports project asPY_IMPORTSedges to the real:PyModule(one edge per module pair, raw spellings preserved in aspellingsarray), externals keep:PyPackage, and unresolved relative spellings (.,.foo,..x) no longer mint bogus:PyPackagenodes (#82).SCHEMA_VERSIONbumped1.1.0 → 1.2.0(additive: new properties onPyAttribute,PyCallSite,PyApplication,PY_IMPORTS;PY_IMPORTSmay now target:PyModule).Deprecated
PyCallsite.argument_types(and thePyCallSite.argument_typesgraph property): it silently mixes AST node categories with inferred type names in one list. Usearguments/arguments_jsoninstead; the legacy field is unchanged and will be removed in schema v2 (#86).Fixed
receiver.method(...)) now resolve to the invoked method instead of the receiver's type — Jedi inference was anchored at the call expression's first character, i.e. the receiver token, so nearly every method call'scallee_signature(and the Neo4jPY_RESOLVES_TOedge) pointed at the receiver's class (#80).PyCallsite.return_typenow holds the inferred type of the call result (the callee's inferred return type, or the instance for a constructor call), and is absent when Jedi cannot tell. Previously it held the type inferred at the call expression's start — effectively the receiver's type (#80).SymbolTableBuilderno longer crashes withValueErrorwhen given a relativeproject_dir: the path is normalized withos.path.abspathat construction (symlinks intact, matching Jedi's own path normalization) (#90)..pyas a substring (odoo/tools/pycompat.py→odoo.toolscompat): only the terminal.pysuffix is stripped, via a single_fallback_signaturehelper replacing three copies of the buggy expression (#84).