Skip to content

Commit 2a4ea4c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 804079e commit 2a4ea4c

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

hooks/post_gen_project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def main() -> None:
3939
remove_file(project_path, ".readthedocs.yaml")
4040

4141
subprocess.run(
42-
("git", "init", "--initial-branch", "main"), check=True, capture_output=True
42+
("git", "init", "--initial-branch", "main"), check=True, capture_output=True,
4343
)
4444

4545
if "{{ cookiecutter.make_initial_commit }}" == "yes":
@@ -82,7 +82,7 @@ def main() -> None:
8282
else:
8383
warnings.warn(
8484
"conda environment could not be created since no conda or mamba "
85-
"executable was found."
85+
"executable was found.",
8686
)
8787

8888

hooks/pre_gen_project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ def main() -> None:
3636

3737
if not re.match(ENVIRON_REGEX, environment_name):
3838
raise ValueError(
39-
EXCEPTION_MSG_ENVIRON_NAME.format(environment_name=environment_name)
39+
EXCEPTION_MSG_ENVIRON_NAME.format(environment_name=environment_name),
4040
)
4141

4242
python_version = "{{ cookiecutter.python_version }}"
4343

4444
if not re.match(PYTHONVERSION_REGEX, python_version):
4545
raise ValueError(
4646
EXCEPTION_MSG_PYTHONVERSION.format(
47-
min_python_version=PYTHONVERSION_MIN, python_version=python_version
48-
)
47+
min_python_version=PYTHONVERSION_MIN, python_version=python_version,
48+
),
4949
)
5050

5151

tests/test_cookie.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
_PYTHON_VERSION = ".".join(map(str, sys.version_info[:2]))
99

1010

11-
@pytest.mark.end_to_end
11+
@pytest.mark.end_to_end()
1212
def test_bake_project(cookies):
1313
result = cookies.bake(
14-
extra_context={"project_slug": "helloworld", "python_version": _PYTHON_VERSION}
14+
extra_context={"project_slug": "helloworld", "python_version": _PYTHON_VERSION},
1515
)
1616

1717
assert result.exit_code == 0
@@ -20,13 +20,13 @@ def test_bake_project(cookies):
2020
assert result.project_path.is_dir()
2121

2222

23-
@pytest.mark.end_to_end
23+
@pytest.mark.end_to_end()
2424
def test_remove_readthedocs(cookies):
2525
result = cookies.bake(
2626
extra_context={
2727
"add_readthedocs": "no",
2828
"python_version": ".".join(map(str, sys.version_info[:2])),
29-
}
29+
},
3030
)
3131

3232
rtd_config = result.project_path.joinpath(".readthedocs.yaml")
@@ -39,10 +39,10 @@ def test_remove_readthedocs(cookies):
3939
assert "readthedocs" not in readme
4040

4141

42-
@pytest.mark.end_to_end
42+
@pytest.mark.end_to_end()
4343
def test_remove_github_actions(cookies):
4444
result = cookies.bake(
45-
extra_context={"add_github_actions": "no", "python_version": _PYTHON_VERSION}
45+
extra_context={"add_github_actions": "no", "python_version": _PYTHON_VERSION},
4646
)
4747

4848
ga_config = result.project_path.joinpath(".github", "workflows", "main.yml")
@@ -55,10 +55,10 @@ def test_remove_github_actions(cookies):
5555
assert "github/workflow/status" not in readme
5656

5757

58-
@pytest.mark.end_to_end
58+
@pytest.mark.end_to_end()
5959
def test_remove_tox(cookies):
6060
result = cookies.bake(
61-
extra_context={"add_tox": "no", "python_version": _PYTHON_VERSION}
61+
extra_context={"add_tox": "no", "python_version": _PYTHON_VERSION},
6262
)
6363

6464
ga_config = result.project_path.joinpath(".github", "workflows", "main.yml")
@@ -71,13 +71,13 @@ def test_remove_tox(cookies):
7171
assert not tox.exists()
7272

7373

74-
@pytest.mark.end_to_end
74+
@pytest.mark.end_to_end()
7575
def test_remove_license(cookies):
7676
result = cookies.bake(
7777
extra_context={
7878
"open_source_license": "Not open source",
7979
"python_version": _PYTHON_VERSION,
80-
}
80+
},
8181
)
8282

8383
license_ = result.project_path.joinpath("LICENSE")
@@ -88,7 +88,7 @@ def test_remove_license(cookies):
8888
assert not license_.exists()
8989

9090

91-
@pytest.mark.end_to_end
91+
@pytest.mark.end_to_end()
9292
@pytest.mark.skipif(os.environ.get("CI") is None, reason="Run only in CI.")
9393
def test_check_conda_environment_creation_and_run_all_checks(cookies):
9494
"""Test that the conda environment is created and pre-commit passes."""
@@ -98,7 +98,7 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
9898
"make_initial_commit": "yes",
9999
"create_conda_environment_at_finish": "yes",
100100
"python_version": _PYTHON_VERSION,
101-
}
101+
},
102102
)
103103

104104
assert result.exit_code == 0
@@ -108,7 +108,7 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
108108
# Switch branch before pre-commit because otherwise failure because on main
109109
# branch.
110110
subprocess.run(
111-
("git", "checkout", "-b", "test"), cwd=result.project_path, check=True
111+
("git", "checkout", "-b", "test"), cwd=result.project_path, check=True,
112112
)
113113

114114
# Check linting, but not on the first try since formatters fix stuff.

0 commit comments

Comments
 (0)