Skip to content

Commit 48f3dea

Browse files
committed
update
1 parent 78f1ee8 commit 48f3dea

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

sprout.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from jinja2.ext import Extension
1111
from rich.text import Text
1212

13-
from sprout import GitDefaultsExtension, Question, Style, validate_repository_url,
13+
from sprout import GitDefaultsExtension, Question, Style, validate_repository_url
1414
from sprout.cli import render_templates
1515
from sprout.prompt import console
1616

@@ -48,16 +48,24 @@ def should_skip(relative_path: Path, answers: dict[str, Any]) -> bool:
4848

4949
if as_posix == "LICENSE.jinja" and answers.get("copyright_license") == "None":
5050
return True
51-
if as_posix == ".github/workflows/tests.yml.jinja" and "tests" not in github_actions:
51+
if (
52+
as_posix == ".github/workflows/tests.yml.jinja"
53+
and "tests" not in github_actions
54+
):
5255
return True
5356
if as_posix == ".github/workflows/lint.yml.jinja" and "lint" not in github_actions:
5457
return True
55-
if as_posix == ".github/workflows/publish.yml.jinja" and "publish" not in github_actions:
58+
if (
59+
as_posix == ".github/workflows/publish.yml.jinja"
60+
and "publish" not in github_actions
61+
):
5662
return True
5763
return False
5864

5965

60-
def validate_package_name(value: str, answers: dict[str, Any]) -> tuple[bool, str | None]:
66+
def validate_package_name(
67+
value: str, answers: dict[str, Any]
68+
) -> tuple[bool, str | None]:
6169
name = value.strip()
6270
if not name:
6371
return False, "Package name is required."
@@ -86,9 +94,15 @@ def validate_versions(value: str, answers: dict[str, Any]) -> tuple[bool, str |
8694
if not required.issubset(answers):
8795
return True, None
8896

89-
min_version = tuple(int(part) for part in str(answers["python_min_version"]).split("."))
90-
max_version = tuple(int(part) for part in str(answers["python_max_version"]).split("."))
91-
default_version = tuple(int(part) for part in str(answers["python_default_version"]).split("."))
97+
min_version = tuple(
98+
int(part) for part in str(answers["python_min_version"]).split(".")
99+
)
100+
max_version = tuple(
101+
int(part) for part in str(answers["python_max_version"]).split(".")
102+
)
103+
default_version = tuple(
104+
int(part) for part in str(answers["python_default_version"]).split(".")
105+
)
92106

93107
if min_version > max_version:
94108
return (

0 commit comments

Comments
 (0)