Skip to content

Ruff UP045: Optional[X] -> X | None in config_resolver.py #503

Closed

Description

@squid-protocol

Objective

Part of the ruff lint baseline cleanup (UP045 -- Optional[X] could be X | None (PEP 604)). Chunked out of the larger sub-issue this replaces, so it's a manageable, self-contained pickup.

Findings

  • gitgalaxy/standards/config_resolver.py:250 (UP045) -- Use X | None for type annotations
  • gitgalaxy/standards/config_resolver.py:251 (UP045) -- Use X | None for type annotations
  • gitgalaxy/standards/config_resolver.py:252 (UP045) -- Use X | None for type annotations

Approach

PEP 604 syntax requires no further Python-version gymnastics since this project's floor is 3.9 and from __future__ import annotations handles runtime evaluation where needed -- confirm that per call site before batch-converting.

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
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