Skip to content

v0.4.8

Choose a tag to compare

@NISH1001 NISH1001 released this 09 Nov 03:21
· 27 commits to main since this release

What changed

The typed linker: when the source states an object's class, calls on that object link to the class's method. (#17)

  • Where the class comes from: parameter annotations (db: Database, Optional[Database], "Database | None"); assignments db = Database(), or db = connect() where connect is annotated -> Database (-> Self and awaited calls too); fields (self.db = db, class-body db: Database); property return types; module-level instances (client = Client()).
  • Not trusted: a name assigned two different classes, or reassigned by for/with, holds no known class. A name the function assigns shadows a module-level name.
  • Safety: a call linked to a base-class method still reaches every override (virtual dispatch). Through a Protocol, an ABC or a framework class, the method name still counts as used everywhere.
  • Numbers (eval corpus, pinned): share of call sites linked went from 46–68% to 50–84% (rich 68 → 84%, httpx 63 → 74%, requests 62 → 69%, flask 51 → 57%, django 46 → 50%, vibepiler 58 → 64%). 3 newly reported dead symbols, each checked by hand and real; none of the 15 labelled false positives returned. On vibepiler itself, the lines kept alive only because their name is used somewhere dropped from about 1,170 to 995.
  • Not yet: method chains (Q().where().all()), list[Foo], unions of two classes, TypeScript annotations, and the JS/TS linker gaps.
  • Version 0.4.8 (package and plugin).