Skip to content

fix: reorder None to the end of type unions (RUF036) - #669

Closed
syzayd wants to merge 0 commit into
jd:mainfrom
syzayd:fix/ruf036-none-union-order
Closed

fix: reorder None to the end of type unions (RUF036)#669
syzayd wants to merge 0 commit into
jd:mainfrom
syzayd:fix/ruf036-none-union-order

Conversation

@syzayd

@syzayd syzayd commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What and why

ruff isn't version-pinned in pyproject.toml, and a newer release started enforcing RUF036 ("None not at the end of a type union"). That currently flags 14 pre-existing annotations across tenacity/__init__.py, tenacity/asyncio/__init__.py, and tenacity/retry.py, and breaks the lint CI job for any PR against main right now (verified: the last green run on main, 2026-08-01, predates this).

Split out on its own here (was flagged as noise when bundled into #668) so it can be reviewed independently.

Change

Pure reordering, no behavior change: uv run ruff check --fix --unsafe-fixes . then ruff format ..

Verification

$ ruff check .
All checks passed!

$ ruff format --check .
20 files already formatted

$ mypy tenacity tests
Success: no issues found in 19 source files

$ pytest -q
173 passed, 1 warning, 12 subtests passed

@jd jd closed this Aug 5, 2026
@jd
jd force-pushed the fix/ruf036-none-union-order branch from d6184fa to ac30991 Compare August 5, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants