fix(nox): use list for nox.options.sessions (nox 2026.8.10 type tightening) - #745
Merged
Conversation
…ening)
nox 2026.8.10 (2026-08-10) tightened the ``sessions`` option's type
from ``Iterable[str]`` to ``list[str] | None``. Our noxfile has always
used a tuple, which the older stubs accepted; the new stubs reject it:
noxfile.py:18: error: Incompatible types in assignment
(expression has type "tuple[str, ...]",
variable has type "list[str] | None") [assignment]
Every CI run since the nox release fails on this -- currently visible
on all four open dependabot PRs (#738-#741) but affects any push /
re-run. Master's last run predates the nox release so it still shows
green in the cache.
One-character fix: tuple parens -> list brackets. Behaviour unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nox 2026.8.10 (released 2026-08-10) tightened the annotation of `nox.options.sessions` from `Iterable[str]` to `list[str] | None`. Our noxfile has always used a tuple, which the old stubs accepted:
```
noxfile.py:18: error: Incompatible types in assignment
(expression has type "tuple[str, ...]",
variable has type "list[str] | None") [assignment]
```
Every CI run since the nox release fails on this. Currently visible on all four open dependabot PRs (#738-#741) but affects any push / re-run. Master's last run predates the release so still cached green.
Fix: tuple parens → list brackets. Behaviour unchanged; runtime still accepts either since nox iterates it.
Test plan