Skip to content

Commit

Permalink
fix: drop unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Jan 14, 2025
1 parent 7ebb615 commit ea89111
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions nox/tox_to_nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,11 @@ def wrapjoin(seq: Iterable[Any]) -> str:


def fixname(envname: str) -> str:
"""Replace dashes with underscores and check if the result is a valid identifier."""
envname = envname.replace("-", "_").replace("testenv:", "")
if not envname.isidentifier():
print(
f"Environment {envname!r} is not a valid nox session name.\n"
"Manually update the session name in noxfile.py before running nox."
)
return envname
"""
Replace dashes with underscores. Tox 4+ requires valid identifiers for
names already.
"""
return envname.replace("-", "_").replace("testenv:", "")


def write_output_to_file(output: str, filename: str) -> None:
Expand Down

0 comments on commit ea89111

Please sign in to comment.