Skip to content

0.6.0

Choose a tag to compare

@github-actions github-actions released this 05 Nov 18:51

Features

  • constructor-after-method (SMP203) reports a constructor (__new__, __init__, __post_init__ or __init_subclass__) defined below another method of its class, and moves it above that method. definition-before-use (SMP201) no longer moves a constructor below a method that calls it, so the two fixes agree (#54) by @gaborbernat.

Bug fixes

  • definition-before-use (SMP201) reads a method's first parameter as the instance or class whatever its name, so klass._make() in a classmethod counts as a use, as do klass().load() and a local that a method assigns from klass() or super().__new__(klass). A lambda in a class body, as property(lambda self: self._load()), reads its first parameter the same way. A staticmethod has no such parameter, so self or cls in one no longer counts as a use (#54) by @gaborbernat.

🐍 PyPI release

📜 Full Changelog