Skip to content

Ruff RUF046: redundant int() casts in gpu_recorder.py #494

Closed

Description

@squid-protocol

Objective

Part of the ruff lint baseline cleanup (RUF046 -- unnecessary int(...) cast around a value that's already an int). Chunked out of the larger sub-issue this replaces, so it's a manageable, self-contained pickup.

Findings

  • gitgalaxy/recorders/gpu_recorder.py:185 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:190 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:210 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:211 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:212 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:213 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:214 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:216 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:217 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:218 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:243 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:252 (RUF046) -- Value being cast to int is already an integer
  • gitgalaxy/recorders/gpu_recorder.py:320 (RUF046) -- Value being cast to int is already an integer

Approach

All 13 are the same one-line fix (drop the redundant int(...) wrapper) in the same file -- safe to batch.

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. Glazzze commented on Aug 9, 2026

    @Glazzze
    Contributor

    Hi @squid-protocol, I’d like to work on this issue. I’ll remove the redundant int(...) casts in gpu_recorder.py and submit a focused PR.

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