Skip to content

Commit 76d2463

Browse files
committed
Et voilà @samcunliffe
1 parent 3961e3e commit 76d2463

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

hooks/post_gen_project.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> in
6666
'-d "{{cookiecutter.project_short_description}}" '
6767
"--public "
6868
"-r origin "
69-
"--source {{cookiecutter.project_slug}}\n"
69+
"--source {{cookiecutter.project_slug}}\n",
7070
)
7171
except FileNotFoundError:
7272
# GitHub CLI isn't installed
@@ -78,7 +78,7 @@ def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> in
7878
"https://docs.github.com/en/get-started/quickstart/create-a-repo.\n\n"
7979
"Then run:\n\n"
8080
"git remote add origin [email protected]:"
81-
"{{cookiecutter.__repo_name}}.git\n"
81+
"{{cookiecutter.__repo_name}}.git\n",
8282
)
8383
except subprocess.CalledProcessError as e:
8484
# some other error
@@ -98,7 +98,7 @@ def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> in
9898
"{{cookiecutter.__repo_url}}/settings/pages\n\n"
9999
"and under 'Built and deployment' selecting 'Deploy from a branch' for "
100100
"the 'Source' drop-down and 'gh-pages' for the 'Branch' drop-down, "
101-
"leaving the branch path drop-down with its default value of '/ (root)'."
101+
"leaving the branch path drop-down with its default value of '/ (root)'.",
102102
)
103103

104104
return _EXIT_SUCCESS
@@ -109,5 +109,5 @@ def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> in
109109
main(
110110
"{{ cookiecutter.initialise_git_repository }}",
111111
"{{ cookiecutter.deploy_docs_to_github_pages }}",
112-
)
112+
),
113113
)

tests/conftest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def _wrapped_with(key: str, value: str) -> dict[str, str]:
3434

3535

3636
def _generate_package(
37-
config: dict[str, str], path: pathlib.Path
37+
config: dict[str, str],
38+
path: pathlib.Path,
3839
) -> tuple[subprocess.CompletedProcess[str], pathlib.Path]:
3940
"""
4041
Generate a project from the cookiecutter template.
@@ -66,7 +67,8 @@ def _generate_package(
6667

6768
@pytest.fixture
6869
def generate_package(
69-
default_config: dict[str, str], tmp_path: pathlib.Path
70+
default_config: dict[str, str],
71+
tmp_path: pathlib.Path,
7072
) -> typing.Callable:
7173
"""Generate project from cookiecutter template."""
7274

tests/test_package_generation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_package_generation(
7171
f2.readlines(),
7272
fromfile=str(actual_file),
7373
tofile=str(expected_file),
74-
)
74+
),
7575
)
7676

7777
if diff:
@@ -112,7 +112,9 @@ def test_pip_installable(
112112

113113
@pytest.mark.parametrize("funder", ["", "STFC", "UKRI", "Wellcome Trust"])
114114
def test_optional_funder(
115-
funder: str, default_config_with: typing.Callable, generate_package: typing.Callable
115+
funder: str,
116+
default_config_with: typing.Callable,
117+
generate_package: typing.Callable,
116118
) -> None:
117119
"""Test specifying funder or not in package generation."""
118120
config = default_config_with("funder", funder)

0 commit comments

Comments
 (0)