|
24 | 24 | # Path to the centralized mypy configuration file at the repository root. |
25 | 25 | # Search upwards to support running nox from both monorepo packages and integration test goldens. |
26 | 26 | MYPY_CONFIG_FILE = next( |
27 | | - (str(p / "mypy.ini") for p in CURRENT_DIRECTORY.parents if (p / "mypy.ini").exists()), |
| 27 | + ( |
| 28 | + str(p / "mypy.ini") |
| 29 | + for p in CURRENT_DIRECTORY.parents |
| 30 | + if (p / "mypy.ini").exists() |
| 31 | + ), |
28 | 32 | str(CURRENT_DIRECTORY.parent.parent / "mypy.ini"), |
29 | 33 | ) |
30 | 34 |
|
@@ -75,7 +79,7 @@ def unit(session): |
75 | 79 | line_coverage, |
76 | 80 | os.path.join("tests", "unit"), |
77 | 81 | os.path.join("tests_async", "unit"), |
78 | | - *session.posargs |
| 82 | + *session.posargs, |
79 | 83 | ) |
80 | 84 |
|
81 | 85 |
|
@@ -113,6 +117,7 @@ def docs(session): |
113 | 117 | os.path.join("docs", "_build", "html", ""), |
114 | 118 | ) |
115 | 119 |
|
| 120 | + |
116 | 121 | @nox.session(python="3.10") |
117 | 122 | def docfx(session): |
118 | 123 | """Build the docfx yaml files for this library.""" |
@@ -258,8 +263,16 @@ def mypy(session): |
258 | 263 | "types-requests", |
259 | 264 | "types-mock", |
260 | 265 | ) |
261 | | - session.run("mypy", |
262 | | - f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "-p", "tests", "-p", "tests_async") |
| 266 | + session.run( |
| 267 | + "mypy", |
| 268 | + f"--config-file={MYPY_CONFIG_FILE}", |
| 269 | + "-p", |
| 270 | + "google", |
| 271 | + "-p", |
| 272 | + "tests", |
| 273 | + "-p", |
| 274 | + "tests_async", |
| 275 | + ) |
263 | 276 |
|
264 | 277 |
|
265 | 278 | @nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) |
@@ -327,7 +340,9 @@ def prerelease_deps(session): |
327 | 340 | # version, the first version we test with in the unit tests sessions has a |
328 | 341 | # constraints file containing all dependencies and extras. |
329 | 342 | with open( |
330 | | - CURRENT_DIRECTORY / "testing" / f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt", |
| 343 | + CURRENT_DIRECTORY |
| 344 | + / "testing" |
| 345 | + / f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt", |
331 | 346 | encoding="utf-8", |
332 | 347 | ) as constraints_file: |
333 | 348 | constraints_text = constraints_file.read() |
@@ -408,7 +423,9 @@ def core_deps_from_source(session): |
408 | 423 | # version, the first version we test with in the unit tests sessions has a |
409 | 424 | # constraints file containing all dependencies and extras. |
410 | 425 | with open( |
411 | | - CURRENT_DIRECTORY / "testing" / f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt", |
| 426 | + CURRENT_DIRECTORY |
| 427 | + / "testing" |
| 428 | + / f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt", |
412 | 429 | encoding="utf-8", |
413 | 430 | ) as constraints_file: |
414 | 431 | constraints_text = constraints_file.read() |
@@ -439,7 +456,9 @@ def core_deps_from_source(session): |
439 | 456 | dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] |
440 | 457 |
|
441 | 458 | session.install(*dep_paths, "--no-deps", "--ignore-installed") |
442 | | - print(f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}") |
| 459 | + print( |
| 460 | + f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}" |
| 461 | + ) |
443 | 462 |
|
444 | 463 | other_deps = [ |
445 | 464 | "cryptography", |
|
0 commit comments