Repository navigation
duckgrep 0.2.0
Added
-
The
typedtier: Python receiver calls (obj.method()) get one confident edge when the receiver's class can be read from syntax. It covers:x = Foo();- annotations, including
Optional[...],X | Noneand string annotations; self.attrset or annotated in the class;- one hop of return annotations;
- imported module-level instances;
selfandsuper()through base classes in other files.
Against jedi, confident coverage of in-repo calls rose from 66.8% to 87.8% on django, 74.3% to 90.9% on freqtrade and 67.6% to 90.1% on requests, with every
typededge exact. -
Calls on receivers whose class is outside the repo (
io.StringIO(), literals, classes with an external base) are nowunresolved, notnameguesses.
Changed
- The resolver refuses rather than guesses: a name bound more than once in a file, Python's method resolution order where syntax can't settle it, and a name a nested def or class shares all get no
typededge and keep the older tiers. - Edge refresh after an edit reads dirty refs in batches, and falls back to a batched rebuild if it runs out of memory, instead of leaving the index unable to answer call-graph queries.
- The schema is at version 4 (a new
bindingstable andsymbols.returns). Existing indexes rebuild themselves on first use. - The
query(sql)tool description names thetypedtier.
Fixed
- Standard-library imports (
import json,datetime,math...) no longer resolve to a nested repo module that happens to share the name. duckgrep.__version__now reports the installed package's version.
Known gaps
- A class or return that turns external in another file: when a class's ancestry, or a function's return annotation, starts or stops being external in another file, calls on its instances keep their old
name/unresolvedtier until those refs are next recomputed.