Skip to content

[G5] flag mutation of module-level mutables without 'global' #16

Description

@pctablet505

_STATE.append(1) inside a module-scoped fixture is missed (no global statement needed for method mutation). Track module-level names bound to mutable literals.

From the pre-release multi-perspective review (2026-07-03). Follow CONTRIBUTING.md; every change ships a true-positive test + a false-positive guard test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement-ruleImprove an existing rule's detection

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions