Skip to content

0.12.1

Choose a tag to compare

@github-actions github-actions released this 13 Nov 20:01
· 8 commits to main since this release
Immutable release. Only release title and notes can be modified.

Changes

Bug fixes

  • definition-before-use no longer pins a class named in the annotations of a standard decorator that never evaluates them, such as dataclass, property, contextmanager or functools.cache, when annotations are lazy, and no longer reads @name.setter as calling the getter while the class body runs (#137) by @gaborbernat.
  • empty-collection-comparison leaves .get(key) == [], .get(key, None) == [] and getattr(obj, name, None) == () alone: a missing value gives None, which a truth test would take for an empty one (#137) by @gaborbernat.
  • iterator-reuse reads the two sides of a if test else b as separate branches, so a generator each side consumes is no longer reported (#137) by @gaborbernat.
  • mutable-module-constant keeps a comment inside a list[...] annotation when its fix makes it a tuple[..., ...]: it renames the base and adds the , ... instead of rewriting the whole annotation (#137) by @gaborbernat.
  • mutable-module-constant leaves pytestmark and the other names pytest reads by name alone: its fix made pytestmark a tuple, which pytest rejects as a single mark (#137) by @gaborbernat.
  • too-many-attributes and the rules that tell class attributes from instance ones read __init_subclass__ and __class_getitem__ as class methods, which Python makes them without a decorator (#137) by @gaborbernat.
  • unused-dependency no longer reports the requirements of a project nested under the tests, which a fixture may list unused on purpose (#137) by @gaborbernat.

🐍 PyPI release

📜 Full Changelog