Skip to content

v1.16.0 — 100 checks

Latest

Choose a tag to compare

@kratos0718 kratos0718 released this 20 Sep 16:19
· 21 commits to main since this release

12 new checks (CH089-CH100), bringing the total to 100.

Same discipline as every prior batch: each check verified empirically before implementation, corpus-scanned against ~30 real open-source frameworks, and narrowed against real false positives rather than shipped on first pass.

CH091 (hash-eq-field-mismatch) was the deepest precision chase this project has done — seven distinct, legitimate ways for __hash__ and __eq__ to reference "the same field" without looking alike syntactically (a method call or @property standing in for a field, multi-field equality via a tuple or a wrapping call instead of named pairs, blanket equality via __dict__ or dataclasses.fields() reflection, and a property wrapping a differently-named private attribute). One genuine bug survived all seven rounds: semantic-kernel's ChatHistorySummarizationReducer hashes two fields its __eq__ never compares.

CH096 (post-init-on-non-dataclass) went from 615 false positives to 1 after finding the same "something else calls __post_init__" convention independently reinvented twice (vllm's own @config decorator, transformers' PreTrainedConfig.__init__ hook).

New checks also catch:

  • str/bytes mixed in the same .join()
  • __exit__ unconditionally suppressing every exception
  • Path.write_text()/write_bytes() given the wrong type
  • asyncio.to_thread() given an async function (never runs its body)
  • The same keyword passed both directly and via **-dict-unpack
  • A lambda target on a spawn/forkserver multiprocessing context
  • raise NotImplemented instead of NotImplementedError
  • Two __slots__-declaring bases colliding
  • str.maketrans() with mismatched-length arguments
  • __iter__ returning self with no __next__

Zero runtime dependencies, verified via a fresh pip install into a clean venv.