Skip to content

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

Open

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions