Skip to content

pyrift v0.8.0 — 104 rules, 519 tests, version-guard awareness, dynamic imports

Latest

Choose a tag to compare

@BHUVANSH855 BHUVANSH855 released this 26 Aug 16:36
· 15 commits to main since this release

Major release — production grade

New rules (15 new)

  • CPY046–CPY057, CPY062–CPY063 — Python 3.14/3.15 coverage
  • PPY046–PPY047 — PyPy additions

Architecture

  • pyrift.analysis — shared AST utilities (imports, calls, scope)
  • Version-guard awareness — if sys.version_info >= (3,11): from typing import Self no longer flagged
  • Dynamic import detection — importlib.import_module('cgi') now caught
  • by_statement() dedup — multi-name from imports produce one finding

Quality

  • 519 tests (was 392)
  • 81/81 golden benchmark cases
  • Self-scan: 120 files, 0 findings, 0 parse errors
  • Corpus: 7 real packages (requests, flask, asyncio, email, httpx, logging, http)
  • Runtime harness: 5 rules verified across CPython 3.10–3.15
  • CI: CPython 3.10–3.14 + PyPy3.11 all run full benchmark suite

Fixed

  • CPY057: protocol=None now flagged (same as no protocol); pickle.Pickler() detected
  • PPY009: no longer flags id() used as dict key
  • 15 BOM-corrupted files stripped — pyrift now correctly scans BOM files
  • Duplicate findings from multi-name from imports fixed
  • ASCII-safe output — no Windows console crashes
  • cpy050 filename typo fixed

Install / upgrade

pip install --upgrade pyrift