Skip to content

Commit ef4f5d0

Browse files
committed
Fix linting issues found by flake8
Some are just `flake8` base checks, and some are found by `pydoclint` (issues that `darglint` didn't catch): * Line too long. * Ununsed imports. * Ambiguous variable name (`l` could be read as L or the number one with some fonts). * Missing argument documentation. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 292da31 commit ef4f5d0

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

cookiecutter/local_extensions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ def introduction(
230230
231231
Welcome to repo-config Cookiecutter template!
232232
233-
This template will help you to create a new repository for your project. You will be asked to provide some information about your project.
233+
This template will help you to create a new repository for your project. \
234+
You will be asked to provide some information about your project.
234235
235236
Here is an explanation of what each variable is for and will be used for:
236237

src/frequenz/repo/config/nox/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def configure(
235235
# We need to make sure sessions are imported, otherwise they won't be visible to nox.
236236
if import_default_sessions:
237237
# pylint: disable=import-outside-toplevel,cyclic-import
238-
from . import session as _
238+
from . import session as _ # noqa: F401
239239

240240
match conf:
241241
case Config():

src/frequenz/repo/config/setuptools/grpc_tools.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import pathlib as _pathlib
1414
import subprocess as _subprocess
1515
import sys as _sys
16-
import tomllib as _tomllib
1716

1817
import setuptools as _setuptools
1918
import setuptools.command.build as _build_command

tests/integration/test_cookiecutter_generation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ def _write_golden_file(golden_path: pathlib.Path, name: str, contents: str) -> i
154154
Args:
155155
golden_path: The path to the directory containing the golden files.
156156
name: The name of the golden file.
157+
contents: The contents of the golden file to write.
157158
158159
Returns:
159160
The number of bytes written.
@@ -259,9 +260,9 @@ def _filter_generation_output(
259260
the generated repo (a temporary directory).
260261
"""
261262
stdout = b"\n".join(
262-
l
263-
for l in result.stdout.splitlines()
264-
if not l.startswith((b"WARNING: The replay file's `_template` (",))
263+
line
264+
for line in result.stdout.splitlines()
265+
if not line.startswith((b"WARNING: The replay file's `_template` (",))
265266
)
266267
return stdout, result.stderr
267268

0 commit comments

Comments
 (0)