Skip to content

Commit

Permalink
Merge pull request #10293 from jdufresne/nox
Browse files Browse the repository at this point in the history
Upgrade nox to remove mypy ignores
  • Loading branch information
pradyunsg committed Aug 13, 2021
2 parents 8bfb6b5 + 030b8b4 commit 4446d1a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
Empty file.
6 changes: 2 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
8 changes: 3 additions & 5 deletions tools/release/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4446d1a

Please sign in to comment.