diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 22a1b36ce..512ef7185 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: args: ["--pretty", "--show-error-codes"] additional_dependencies: [ 'keyring==23.0.1', - 'nox==2020.12.31', + 'nox==2021.6.12', 'types-docutils==0.1.8', 'types-six==0.1.9', ] diff --git a/news/65e526fd-8d34-483b-90db-e1e1ac38741a.trivial.rst b/news/65e526fd-8d34-483b-90db-e1e1ac38741a.trivial.rst new file mode 100644 index 000000000..e69de29bb diff --git a/noxfile.py b/noxfile.py index f0b5b1810..3cab71848 100644 --- a/noxfile.py +++ b/noxfile.py @@ -40,8 +40,7 @@ def run_with_protected_pip(session: nox.Session, *arguments: str) -> None: (stable) version, and not the code being tested. This ensures pip being used is not the code being tested. """ - # https://github.com/theacodes/nox/pull/377 - env = {"VIRTUAL_ENV": session.virtualenv.location} # type: ignore + env = {"VIRTUAL_ENV": session.virtualenv.location} command = ("python", LOCATIONS["protected-pip"]) + arguments session.run(*command, env=env, silent=True) @@ -87,8 +86,7 @@ def test(session: nox.Session) -> None: session.log(msg) # Build source distribution - # https://github.com/theacodes/nox/pull/377 - sdist_dir = os.path.join(session.virtualenv.location, "sdist") # type: ignore + sdist_dir = os.path.join(session.virtualenv.location, "sdist") if os.path.exists(sdist_dir): shutil.rmtree(sdist_dir, ignore_errors=True) diff --git a/tools/release/__init__.py b/tools/release/__init__.py index 06a9767d5..65fa02676 100644 --- a/tools/release/__init__.py +++ b/tools/release/__init__.py @@ -26,8 +26,7 @@ def get_version_from_arguments(session: Session) -> Optional[str]: # We delegate to a script here, so that it can depend on packaging. session.install("packaging") cmd = [ - # https://github.com/theacodes/nox/pull/378 - os.path.join(session.bin, "python"), # type: ignore + os.path.join(session.bin, "python"), "tools/release/check_version.py", version, ] @@ -156,12 +155,11 @@ def workdir( """Temporarily chdir when entering CM and chdir back on exit.""" orig_dir = pathlib.Path.cwd() - # https://github.com/theacodes/nox/pull/376 - nox_session.chdir(dir_path) # type: ignore + nox_session.chdir(dir_path) try: yield dir_path finally: - nox_session.chdir(orig_dir) # type: ignore + nox_session.chdir(orig_dir) @contextlib.contextmanager