Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version:
- "3.9"
- "3.11"
- "3.10"
- "3.12"
- "3.14"
include:
- os: ubuntu-22.04
python-version: "3.9"
- os: ubuntu-22.04
python-version: "3.11"
- os: ubuntu-22.04
python-version: "3.13"
- os: macos-15-intel
python-version: "3.12"
steps:
Expand All @@ -41,8 +41,8 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: |
3.9
3.10
3.11
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
Expand Down
3 changes: 2 additions & 1 deletion nox/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import functools
import inspect
import types
from typing import TYPE_CHECKING, Any, Callable, Literal, TypeVar, cast
from collections.abc import Callable
from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast

if TYPE_CHECKING:
from collections.abc import Iterable, Mapping, Sequence
Expand Down
2 changes: 1 addition & 1 deletion nox/_option_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __dir__() -> list[str]:


av_opt_str = av.optional(av.instance_of(str))
av_opt_path = av.optional(av.or_(av.instance_of(str), av.instance_of(os.PathLike)))
av_opt_path = av.optional(av.or_(av.instance_of(str), av.instance_of(os.PathLike))) # type: ignore[type-abstract]
av_opt_list_str = av.optional(
av.deep_iterable(
member_validator=av.instance_of(str),
Expand Down
4 changes: 2 additions & 2 deletions nox/_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import itertools
import os
import sys
from typing import TYPE_CHECKING, Any, Callable, Literal
from typing import TYPE_CHECKING, Any, Literal

import argcomplete

Expand All @@ -30,7 +30,7 @@
from nox.virtualenv import ALL_VENVS

if TYPE_CHECKING:
from collections.abc import Iterable, Sequence
from collections.abc import Callable, Iterable, Sequence

from nox._option_set import NoxOptions

Expand Down
8 changes: 4 additions & 4 deletions nox/_parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import functools
import itertools
from collections.abc import Iterable
from typing import TYPE_CHECKING, Any, Union
from typing import TYPE_CHECKING, Any

if TYPE_CHECKING:
from collections.abc import Callable, Sequence
Expand Down Expand Up @@ -64,7 +64,7 @@ def __init__(

@property
def call_spec(self) -> dict[str, Any]:
return dict(zip(self.arg_names, self.args))
return dict(zip(self.arg_names, self.args, strict=True))

def __str__(self) -> str:
if self.id:
Expand Down Expand Up @@ -96,7 +96,7 @@ def __eq__(self, other: object) -> bool:
and self.tags == other.tags
)
if isinstance(other, dict):
return dict(zip(self.arg_names, self.args)) == other
return dict(zip(self.arg_names, self.args, strict=True)) == other

return NotImplemented

Expand All @@ -108,7 +108,7 @@ def _apply_param_specs(param_specs: Iterable[Param], f: Any) -> Any:
return f


ArgValue = Union[Param, Iterable[Any]]
ArgValue = Param | Iterable[Any]


def parametrize_decorator(
Expand Down
3 changes: 1 addition & 2 deletions nox/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from __future__ import annotations

from collections.abc import Sequence
from typing import Union

__all__ = ["Python"]

Expand All @@ -24,4 +23,4 @@ def __dir__() -> list[str]:
return __all__


Python = Union[str, Sequence[str], bool, None]
Python = str | Sequence[str] | bool | None
3 changes: 2 additions & 1 deletion nox/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
import copy
import functools
import warnings
from typing import TYPE_CHECKING, Any, Callable, Literal, overload
from collections.abc import Callable
from typing import TYPE_CHECKING, Any, Literal, overload

from ._decorators import Func

Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ license = "Apache-2.0"
authors = [
{ name = "Alethea Katherine Flowers", email = "[email protected]" },
]
requires-python = ">=3.9"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand All @@ -29,7 +29,6 @@ classifiers = [
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -46,8 +45,7 @@ dependencies = [
"packaging>=20.9; python_version<'3.10'",
"packaging>=21; python_version>='3.10'",
"tomli>=1.1; python_version<'3.11'",
"virtualenv>=20.14.1; python_version<'3.10'",
"virtualenv>=20.15; python_version>='3.10'",
"virtualenv>=20.15",
]
optional-dependencies.pbs = [
"pbs-installer[all]>=2025.1.6",
Expand Down Expand Up @@ -172,7 +170,7 @@ report.exclude_also = [
report.omit = [ "nox/_typing.py" ]

[tool.mypy]
python_version = "3.9"
python_version = "3.10"
strict = true
warn_unreachable = true
enable_error_code = [ "ignore-without-code", "redundant-expr", "truthy-bool" ]
Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
import subprocess
from pathlib import Path
from string import Template
from typing import Any, Callable
from typing import TYPE_CHECKING, Any

import pytest

if TYPE_CHECKING:
from collections.abc import Callable

HAS_CONDA = shutil.which("conda") is not None


Expand Down
6 changes: 3 additions & 3 deletions tests/resources/noxfile_requires.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def j(session):
print(session.name)


@nox.session(python=["3.9", "3.10"])
@nox.session(python=["3.10", "3.11"])
def k(session):
print(session.name)

Expand All @@ -77,7 +77,7 @@ def m(session):
print(session.name)


@nox.session(python="3.10", requires=["k-{python}"])
@nox.session(python="3.11", requires=["k-{python}"])
def n(session):
print(session.name)

Expand All @@ -87,7 +87,7 @@ def o(session):
print(session.name)


@nox.session(python=["3.9", "3.10"])
@nox.session(python=["3.10", "3.11"])
def p(session):
print(session.name)

Expand Down
Loading