Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit af50b60

Browse files
1 parent 0a8b77b commit af50b60

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

samples/beam/noxfile.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import nox
2424

25+
2526
# WARNING - WARNING - WARNING - WARNING - WARNING
2627
# WARNING - WARNING - WARNING - WARNING - WARNING
2728
# DO NOT EDIT THIS FILE EVER!
@@ -146,7 +147,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]:
146147
@nox.session
147148
def lint(session: nox.sessions.Session) -> None:
148149
if not TEST_CONFIG["enforce_type_hints"]:
149-
session.install("flake8<6.0.0", "flake8-import-order")
150+
session.install("flake8", "flake8-import-order")
150151
else:
151152
session.install("flake8", "flake8-import-order", "flake8-annotations")
152153

@@ -156,7 +157,6 @@ def lint(session: nox.sessions.Session) -> None:
156157
",".join(local_names),
157158
".",
158159
]
159-
args = ["-v"]
160160
session.run("flake8", *args)
161161

162162

@@ -178,7 +178,6 @@ def blacken(session: nox.sessions.Session) -> None:
178178
# format = isort + black
179179
#
180180

181-
182181
@nox.session
183182
def format(session: nox.sessions.Session) -> None:
184183
"""
@@ -206,9 +205,7 @@ def _session_tests(
206205
session: nox.sessions.Session, post_install: Callable = None
207206
) -> None:
208207
# check for presence of tests
209-
test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob(
210-
"**/test_*.py", recursive=True
211-
)
208+
test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob("**/test_*.py", recursive=True)
212209
test_list.extend(glob.glob("**/tests", recursive=True))
213210

214211
if len(test_list) == 0:
@@ -230,7 +227,9 @@ def _session_tests(
230227

231228
if os.path.exists("requirements-test.txt"):
232229
if os.path.exists("constraints-test.txt"):
233-
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
230+
session.install(
231+
"-r", "requirements-test.txt", "-c", "constraints-test.txt"
232+
)
234233
else:
235234
session.install("-r", "requirements-test.txt")
236235
with open("requirements-test.txt") as rtfile:
@@ -243,9 +242,9 @@ def _session_tests(
243242
post_install(session)
244243

245244
if "pytest-parallel" in packages:
246-
concurrent_args.extend(["--workers", "auto", "--tests-per-worker", "auto"])
245+
concurrent_args.extend(['--workers', 'auto', '--tests-per-worker', 'auto'])
247246
elif "pytest-xdist" in packages:
248-
concurrent_args.extend(["-n", "auto"])
247+
concurrent_args.extend(['-n', 'auto'])
249248

250249
session.run(
251250
"pytest",
@@ -275,7 +274,7 @@ def py(session: nox.sessions.Session) -> None:
275274

276275

277276
def _get_repo_root() -> Optional[str]:
278-
"""Returns the root folder of the project."""
277+
""" Returns the root folder of the project. """
279278
# Get root of this repository. Assume we don't have directories nested deeper than 10 items.
280279
p = Path(os.getcwd())
281280
for i in range(10):

0 commit comments

Comments
 (0)