Loading...
Loading...
Python code-quality anti-patterns and review checks: exception-hierarchy correctness, singleton identity comparison, narrow exception handling, wildcard-import avoidance, magic-number naming, and dead-local removal. Use when reviewing or self-reviewing Python code for correctness and readability defects that linters and reviewers should catch.
npx skill4agent add bobmatnyc/claude-mpm-skills code-qualitypytestcode-quality-scoringSource note: These anti-patterns are derived from CAST Highlight's Python code quality indicators (https://doc.casthighlight.com/), which reference PEP 8 and the Python data model as primary sources. Where a rule mirrors PEP 8, the PEP is the authoritative source. All examples are original.
ruffpylintmypypytestcode-quality-scoringExceptionobjectexceptis==isis notNoneTrueFalseisexceptexcept Exceptionfrom x import *ruffE711E712pylintmypyexcept ExceptionobjectBaseException== None== Trueis "some literal"except:except BaseException:from module import *__init__.py__all__toolchains/python/testing/pytestexceptuniversal/process/code-review-standardsuniversal/quality/code-quality-scoring