-
Notifications
You must be signed in to change notification settings - Fork 8
Ruff UP045: Optional[X] -> X | None in config_resolver.py #503
Copy link
Copy link
Open
Labels
good first issueAccessible entry point for new community contributorsAccessible entry point for new community contributorspriority: lowUI tweaks, documentation, and minor optimizationsUI tweaks, documentation, and minor optimizationspythonPython-specific runtime or environment optimizationsPython-specific runtime or environment optimizationsrefactorStructural cleanup or optimization without altering behaviorStructural cleanup or optimization without altering behavior
Description
Metadata
Metadata
Assignees
Labels
good first issueAccessible entry point for new community contributorsAccessible entry point for new community contributorspriority: lowUI tweaks, documentation, and minor optimizationsUI tweaks, documentation, and minor optimizationspythonPython-specific runtime or environment optimizationsPython-specific runtime or environment optimizationsrefactorStructural cleanup or optimization without altering behaviorStructural cleanup or optimization without altering behavior
Objective
Part of the ruff lint baseline cleanup (UP045 --
Optional[X]could beX | 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) -- UseX | Nonefor type annotationsgitgalaxy/standards/config_resolver.py:251(UP045) -- UseX | Nonefor type annotationsgitgalaxy/standards/config_resolver.py:252(UP045) -- UseX | Nonefor type annotationsApproach
PEP 604 syntax requires no further Python-version gymnastics since this project's floor is 3.9 and
from __future__ import annotationshandles 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(seetests/ruff_audit.py's module docstring for the regen command).Parent: #469