Skip to content

fix(nox): use list for nox.options.sessions (nox 2026.8.10 type tightening) - #745

Merged
bosd merged 1 commit into
masterfrom
fix/nox-sessions-list-type
Aug 11, 2026
Merged

fix(nox): use list for nox.options.sessions (nox 2026.8.10 type tightening)#745
bosd merged 1 commit into
masterfrom
fix/nox-sessions-list-type

Conversation

@bosd

@bosd bosd commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

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

  • Diff: one-line semantic change
  • CI: mypy 3.10 + 3.13 both green

…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.
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@bosd
bosd merged commit 325410c into master Aug 11, 2026
15 checks passed
@bosd
bosd deleted the fix/nox-sessions-list-type branch August 11, 2026 17:37
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.

1 participant