Skip to content

Commit 2aa72f3

Browse files
committed
Update to replace module_name in noxfile.py
1 parent 7b18fb7 commit 2aa72f3

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

init_template.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
PLACEHOLDER_DIR = [Path("src/module_name/sample_data")]
1818
PYPROJECT_TARGET = Path("pyproject.toml")
1919
README_TARGET = Path("README.md")
20-
TOX_TARGET = Path("tox.ini")
20+
NOX_TARGET = Path("noxfile.py")
2121
ALT_FILE_DIR = Path("alt_files")
2222
REQUIREMENTS_DIR = Path("requirements")
2323
ORG = "Preocts"
@@ -111,12 +111,12 @@ def replace_readme_values(data: ProjectData) -> None:
111111
README_TARGET.write_text(readme)
112112

113113

114-
@bookends("Updating tox.ini values")
115-
def replace_tox_values(data: ProjectData) -> None:
116-
"""Update tox value, replacing module_name with actual module name."""
117-
tox = Path(TOX_TARGET).read_text()
118-
tox = tox.replace("module_name", data.module)
119-
Path(TOX_TARGET).write_text(tox)
114+
@bookends("Updating noxfile.py values")
115+
def replace_nox_values(data: ProjectData) -> None:
116+
"""Update nox value, replacing module_name with actual module name."""
117+
noxfile = Path(NOX_TARGET).read_text()
118+
noxfile = noxfile.replace("module_name", data.module)
119+
Path(NOX_TARGET).write_text(noxfile)
120120

121121

122122
@bookends("Renaming src/module_name folder")
@@ -132,7 +132,7 @@ def rename_module_folder(name: str) -> None:
132132
project_data = get_project_data()
133133

134134
replace_pyproject_values(project_data)
135-
replace_tox_values(project_data)
135+
replace_nox_values(project_data)
136136
replace_readme_values(project_data)
137137

138138
delete_placeholder_files()

0 commit comments

Comments
 (0)