Skip to content

Commit e167d36

Browse files
committed
Apply updated formatting with black changes
1 parent dc2d61f commit e167d36

File tree

6 files changed

+37
-16
lines changed

6 files changed

+37
-16
lines changed

project-template/{{cookiecutter.repo_name}}/doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@
8888
# All HTTP redirections from the source URI to
8989
# the canonical URI will be treated as "working".
9090
r"https://github\.com/.*": r"https://github\.com/login*"
91-
}
91+
}

project-template/{{cookiecutter.repo_name}}/noxconfig.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ class Config:
1717
/ "version.py"
1818
)
1919
path_filters: Iterable[str] = ()
20-
pyupgrade_args: Iterable[str] = ("--py{{cookiecutter.python_version_min | replace('.', '')}}-plus",)
20+
pyupgrade_args: Iterable[str] = (
21+
"--py{{cookiecutter.python_version_min | replace('.', '')}}-plus",
22+
)
2123
plugins: Iterable[object] = ()
2224

2325

test/integration/project-template/conftest.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,19 @@ def new_project(cwd):
1818
package_name = "package"
1919

2020
subprocess.run(
21-
["cookiecutter", PROJECT_CONFIG.root / "project-template", "-o", cwd, "--no-input",
22-
f"project_name={project_name}", f"repo_name={repo_name}",
23-
f"package_name={package_name}",
24-
], capture_output=True, check=True)
21+
[
22+
"cookiecutter",
23+
PROJECT_CONFIG.root / "project-template",
24+
"-o",
25+
cwd,
26+
"--no-input",
27+
f"project_name={project_name}",
28+
f"repo_name={repo_name}",
29+
f"package_name={package_name}",
30+
],
31+
capture_output=True,
32+
check=True,
33+
)
2534

2635
return cwd / repo_name
2736

@@ -61,7 +70,6 @@ def _run_command_fixture(command, **kwargs):
6170
"cwd": new_project,
6271
"env": {"PATH": f"{Path(git_path).parent}:{Path(poetry_path).parent}"},
6372
"text": True,
64-
6573
}
6674
config = {**defaults, **kwargs}
6775

test/integration/project-template/nox_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ class TestSpecificNoxTasks:
1616
"""
1717

1818
@staticmethod
19-
def _command(poetry_path: str, task: str,
20-
add_ons: Optional[list[str]] = None) -> list[str]:
19+
def _command(
20+
poetry_path: str, task: str, add_ons: Optional[list[str]] = None
21+
) -> list[str]:
2122
base = [poetry_path, "run", "--", "nox", "-s", task]
2223
if add_ons:
2324
base = base + ["--"] + add_ons
@@ -37,8 +38,9 @@ def test_artifact_validate(self, poetry_path, run_command):
3738
run_command(lint_security)
3839
test_unit = self._command(poetry_path, "test:unit", ["--coverage"])
3940
run_command(test_unit)
40-
test_integration = self._command(poetry_path, "test:integration",
41-
["--coverage"])
41+
test_integration = self._command(
42+
poetry_path, "test:integration", ["--coverage"]
43+
)
4244
run_command(test_integration)
4345
# `artifacts:copy` is skipped here. This step has the pre-requisite that files
4446
# were uploaded to & then downloaded from the GitHub run's artifacts.

test/integration/project-template/poetry_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ def test_poetry_check_passes(new_project):
88
attributes, so there could be keys, like `project-abc = 127`, that are present, but,
99
as they do not have a meaning for poetry, they are ignored.
1010
"""
11-
output = subprocess.run(["poetry", "check"], cwd=new_project,
12-
capture_output=True, text=True)
11+
output = subprocess.run(
12+
["poetry", "check"], cwd=new_project, capture_output=True, text=True
13+
)
1314

1415
assert output.stderr == ""
1516
assert output.stdout == "All set!\n"

test/integration/project-template/pre_commit_test.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@ def pre_commit(run_command, new_project, poetry_path):
1010
class TestPreCommitConfig:
1111
@staticmethod
1212
def _command(poetry_path: str, stage: str) -> list[str]:
13-
return [poetry_path, "run", "--", "pre-commit", "run", "--hook-stage", stage,
14-
"--files",
15-
"exasol/package/version.py"]
13+
return [
14+
poetry_path,
15+
"run",
16+
"--",
17+
"pre-commit",
18+
"run",
19+
"--hook-stage",
20+
stage,
21+
"--files",
22+
"exasol/package/version.py",
23+
]
1624

1725
def test_stage_pre_commit(self, pre_commit, poetry_path, run_command):
1826
command = self._command(poetry_path, "pre-commit")

0 commit comments

Comments
 (0)