Skip to content

Commit c4f032a

Browse files
committed
Lint
1 parent 8deccff commit c4f032a

28 files changed

+88
-64
lines changed

repo_helper/blocks/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,8 @@ def make(self) -> StringList:
553553
self.primary_conda_channel,
554554
)
555555
substitutions["conda-platform"] = self.make_conda_platform_shield(
556-
self.conda_name, self.primary_conda_channel
556+
self.conda_name,
557+
self.primary_conda_channel,
557558
)
558559

559560
if self.docker_shields:

repo_helper/cli/commands/show.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def log(
109109
from_date: Optional[datetime] = None,
110110
from_tag: Optional[str] = None,
111111
colour: Optional[bool] = None,
112-
no_pager: bool = False
112+
no_pager: bool = False,
113113
) -> int:
114114
"""
115115
Show git commit log.

repo_helper/configupdater2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ def __init__(
678678
comment_prefixes: Sequence[str] = ('#', ';'),
679679
inline_comment_prefixes: Optional[Sequence[str]] = None,
680680
strict: bool = True,
681-
space_around_delimiters: bool = True
681+
space_around_delimiters: bool = True,
682682
):
683683

684684
self._filename: Optional[str] = None
@@ -979,7 +979,7 @@ def validate_format(self, **kwargs: Any) -> None:
979979
allow_no_value=self._allow_no_value,
980980
inline_comment_prefixes=self._inline_comment_prefixes,
981981
strict=self._strict,
982-
empty_lines_in_values=self._empty_lines_in_values
982+
empty_lines_in_values=self._empty_lines_in_values,
983983
)
984984
args.update(kwargs)
985985
parser = ConfigParser(**args) # type: ignore[call-overload]

repo_helper/configuration/metadata.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"pure_python",
5757
"on_pypi",
5858
"stubs_package",
59-
"assignee"
59+
"assignee",
6060
]
6161

6262

@@ -360,9 +360,8 @@ def validate(cls, raw_config_vars: Optional[Dict[str, Any]] = None) -> List[str]
360360

361361
for classifier in data:
362362
if not isinstance(classifier, str):
363-
raise ValueError(
364-
f"'classifiers' must be a List of {cls.dtype.__args__[0]}" # type: ignore[attr-defined]
365-
) from None
363+
msg = f"'classifiers' must be a List of {cls.dtype.__args__[0]}" # type: ignore[attr-defined]
364+
raise ValueError(msg) from None
366365

367366
for classifier in data:
368367
classifier_list.add(classifier)

repo_helper/configuration/python_versions_.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,8 @@ def validate(cls, raw_config_vars: Optional[RawConfigVarsType] = None) -> Any:
214214
return buf
215215

216216
else:
217-
raise ValueError(
218-
f"'{cls.__name__}' must be a dictionary mapping strings to dictionaries, or a list of strings"
219-
)
217+
msg = f"'{cls.__name__}' must be a dictionary mapping strings to dictionaries, or a list of strings"
218+
raise ValueError(msg)
220219

221220

222221
class third_party_version_matrix(ConfigVar):

repo_helper/configuration/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"tox_build_requirements",
4848
"tox_requirements",
4949
"tox_testenv_extras",
50-
"tox_unmanaged"
50+
"tox_unmanaged",
5151
]
5252

5353

repo_helper/configuration/travis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"travis_ubuntu_version",
3535
"travis_extra_install_pre",
3636
"travis_extra_install_post",
37-
"travis_additional_requirements"
37+
"travis_additional_requirements",
3838
]
3939

4040

repo_helper/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class RepoHelper:
8080
def __init__(
8181
self,
8282
target_repo: PathLike,
83-
managed_message: str = "This file is managed by 'repo_helper'. Don't edit it directly."
83+
managed_message: str = "This file is managed by 'repo_helper'. Don't edit it directly.",
8484
):
8585
import_registered_functions()
8686

repo_helper/files/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def register(
6262
exclude_name: str,
6363
exclude_unless_true: Sequence[str] = (),
6464
*,
65-
name: Optional[str] = None
65+
name: Optional[str] = None,
6666
) -> Callable:
6767
"""
6868
Decorator to register a function.
@@ -90,9 +90,8 @@ def _decorator(function: Callable) -> Callable:
9090
signature = inspect.signature(function)
9191

9292
if list(signature.parameters.keys()) != ["repo_path", "templates"]:
93-
raise SyntaxError(
94-
"The decorated function must take only the following arguments: 'repo_path' and 'templates'"
95-
)
93+
msg = "The decorated function must take only the following arguments: 'repo_path' and 'templates'"
94+
raise SyntaxError(msg)
9695

9796
self.append((function, exclude_name, exclude_unless_true))
9897

repo_helper/files/ci_cd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ def make_github_manylinux(repo_path: pathlib.Path, templates: Environment) -> Li
670670
"python -m pip install --upgrade pip setuptools wheel",
671671
"python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0",
672672
# Virtualenv 20.16.0 ships broken version of pip (https://github.com/pypa/pip/issues/11294)
673-
*templates.globals["github_ci_requirements"]["Linux"]["post"]
673+
*templates.globals["github_ci_requirements"]["Linux"]["post"],
674674
]
675675

676676
matrix_config = []

0 commit comments

Comments
 (0)