vetkit.py.quality.mutable-default-argument
A mutable default argument is created once and shared between calls, so changes made in one call leak into the next.
Last updated:
Suite: Code quality
python
A mutable default argument is created once and shared between calls, so changes made in one call leak into the next.
Category: QUALITY · Engine rule severity: WARNING
How to fix it
Default to None and create the list/dict/set inside the function.
References
Source: packages/engine/rules/quality/python.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.