Skip to content

Commit ff92d80

Browse files
committed
Updated noxfile to handle singular and plural install/update/removal
1 parent cf013f2 commit ff92d80

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

noxfile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
@session # to only run on the current python interpreter
2929
def create_settings(session: Session) -> None:
3030
"""One-time creation of noxsettings.toml."""
31+
arg_trigger = False
3132
if session.posargs:
3233
# check if the trigger argument was used
3334
arg_trigger = any(arg.lower() == "create-settings-file" for arg in session.posargs)
@@ -83,8 +84,8 @@ def check_development_environment(session: Session) -> None:
8384
session.log("Skipping development environment check on the GitHub Actions runner, as this is always up to date.")
8485
return None
8586
output: str = session.run("poetry", "install", "--sync", "--dry-run", "--with", "test", silent=True, external=True)
86-
match = re.search(r"Package operations: (\d+) installs, (\d+) updates, (\d+) removals, \d+ skipped", output)
87-
assert match is not None
87+
match = re.search(r"Package operations: (\d+) (?:install|installs), (\d+) (?:update|updates), (\d+) (?:removal|removals), \d+ skipped", output)
88+
assert match is not None, f"Invalid output: {output}"
8889
groups = match.groups()
8990
installs, updates, removals = int(groups[0]), int(groups[1]), int(groups[2])
9091
if installs > 0 or updates > 0:

0 commit comments

Comments
 (0)