Skip to content

Ruff SIM118: key in d.keys() findings #496

Closed

Description

@squid-protocol

Objective

Part of the ruff lint baseline cleanup (SIM118 -- key in d.keys() instead of key in d). Chunked out of the larger sub-issue this replaces, so it's a manageable, self-contained pickup.

Findings

  • gitgalaxy/galaxyscope.py:1126 (SIM118) -- Use key in dict instead of key in dict.keys()
  • gitgalaxy/galaxyscope.py:1137 (SIM118) -- Use key in dict instead of key in dict.keys()
  • gitgalaxy/galaxyscope.py:2539 (SIM118) -- Use key in dict instead of key in dict.keys()
  • gitgalaxy/galaxyscope.py:2562 (SIM118) -- Use key in dict instead of key in dict.keys()
  • gitgalaxy/metrics/chronometer.py:299 (SIM118) -- Use key in dict instead of key in dict.keys()
  • gitgalaxy/metrics/signal_processor.py:89 (SIM118) -- Use key in dict instead of key in dict.keys()
  • gitgalaxy/metrics/signal_processor.py:512 (SIM118) -- Use key in dict instead of key in dict.keys()
  • gitgalaxy/metrics/signal_processor.py:664 (SIM118) -- Use key in dict instead of key in dict.keys()
  • gitgalaxy/tools/network_auditing/full_api_network_map.py:180 (SIM118) -- Use key in dict instead of key in dict.keys()

Fix in a small PR, removing resolved entries from tests/ruff_audit_baseline.json (see tests/ruff_audit.py's module docstring for the regen command).

Parent: #469

Activity

  1. added
    good first issue
    python
    refactor
    priority: low
    on Jul 26, 2026
  2. deepa-raj commented on Aug 16, 2026

    @deepa-raj
    Contributor

    Hi, I'd like to work on this as my next contribution — I recently completed #500 and #501 in this repo. I'll go through the 9 findings and convert key in dict.keys() to key in dict across the 4 files listed. Could you assign it to me?

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

    good first issuepriority: lowpythonrefactor

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions