Skip to content

Commit 264f457

Browse files
authored
chore: normalize extra (#1059)
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 516d9bc commit 264f457

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ repos:
1919
- id: trailing-whitespace
2020

2121
- repo: https://github.com/tox-dev/pyproject-fmt
22-
rev: "v2.11.1"
22+
rev: "v2.12.1"
2323
hooks:
2424
- id: pyproject-fmt
2525

2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.14.4
27+
rev: v0.15.0
2828
hooks:
2929
- id: ruff-check
3030
args: ["--fix", "--show-fixes"]
3131
- id: ruff-format
3232

3333
- repo: https://github.com/pre-commit/mirrors-mypy
34-
rev: v1.18.2
34+
rev: v1.19.1
3535
hooks:
3636
- id: mypy
3737
files: ^(nox/|tests/)

docs/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,11 @@ Converting from tox
479479

480480
Nox has experimental support for converting ``tox.ini`` files into ``noxfile.py`` files. This doesn't support every feature of tox and is intended to just do most of the mechanical work of converting over- you'll likely still need to make a few changes to the converted ``noxfile.py``.
481481

482-
To use the converter, install ``nox`` with the ``tox_to_nox`` extra:
482+
To use the converter, install ``nox`` with the ``tox-to-nox`` extra:
483483

484484
.. code-block:: console
485485
486-
pip install --upgrade nox[tox_to_nox]
486+
pip install --upgrade nox[tox-to-nox]
487487
488488
Then, just run ``tox-to-nox`` in the directory where your ``tox.ini`` resides:
489489

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def tests(session: nox.Session) -> None:
4747

4848
session.create_tmp() # Fixes permission errors on Windows
4949
session.install(*PYPROJECT["dependency-groups"]["test"], "uv")
50-
session.install("-e.[tox_to_nox,pbs]")
50+
session.install("-e.[tox-to-nox,pbs]")
5151
extra_env = {"PYTHONWARNDEFAULTENCODING": "1"}
5252
session.run(
5353
"pytest",

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dependencies = [
5151
optional-dependencies.pbs = [
5252
"pbs-installer[all]>=2025.1.6",
5353
]
54-
optional-dependencies.tox_to_nox = [
54+
optional-dependencies.tox-to-nox = [
5555
"jinja2",
5656
"tox>=4",
5757
]
@@ -84,9 +84,6 @@ docs = [
8484
"witchhazel",
8585
]
8686

87-
[tool.hatch]
88-
metadata.allow-ambiguous-features = true # disable normalization (tox-to-nox) for back-compat
89-
9087
[tool.ruff]
9188
show-fixes = true
9289
lint.select = [ "ALL" ]

tests/test__cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ def test_get_dependencies() -> None:
2222
with pytest.raises(ModuleNotFoundError):
2323
list(
2424
nox._cli.get_dependencies(
25-
packaging.requirements.Requirement("nox[tox_to_nox]")
25+
packaging.requirements.Requirement("nox[tox-to-nox]")
2626
)
2727
)
2828
else:
2929
deps = nox._cli.get_dependencies(
30-
packaging.requirements.Requirement("nox[tox_to_nox]")
30+
packaging.requirements.Requirement("nox[tox-to-nox]")
3131
)
3232
dep_list = {
3333
"argcomplete",

tests/test_sessions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ def test_fallback_venv(
12761276
with mock.patch("nox.virtualenv.VirtualEnv.create", autospec=True):
12771277
runner._create_venv()
12781278
assert runner.venv
1279-
assert runner.venv.venv_backend == venv_backend.split("|")[-1]
1279+
assert runner.venv.venv_backend == venv_backend.rsplit("|", maxsplit=1)[-1]
12801280

12811281
@pytest.mark.parametrize(
12821282
"venv_backend",

tests/test_virtualenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ def test__resolved_interpreter_not_found(
13311331

13321332

13331333
@mock.patch("nox.virtualenv._PLATFORM", new="win32")
1334-
@mock.patch("nox.virtualenv.locate_via_py", new=lambda _: None) # type: ignore[misc] # noqa: PT008
1334+
@mock.patch("nox.virtualenv.locate_via_py", new=lambda _: None) # type: ignore[untyped-decorator] # noqa: PT008
13351335
def test__resolved_interpreter_nonstandard(
13361336
make_one: Callable[..., tuple[VirtualEnv, Path]],
13371337
) -> None:

0 commit comments

Comments
 (0)