Skip to content

[G12] detect os.environ |= {...} (AugAssign) mutation #11

Description

@pctablet505

G12 catches os.environ['K']=v, .update(), del — but not the Python 3.9+ merge-assign form os.environ |= {'K':'1'}. Add an ast.AugAssign branch in _mutation().

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions