|
22 | 22 | import pathlib |
23 | 23 | import re |
24 | 24 | import shutil |
| 25 | +from typing import Dict, List |
25 | 26 | import warnings |
26 | 27 |
|
27 | 28 | import nox |
28 | 29 |
|
29 | | -BLACK_VERSION = "black==22.3.0" |
30 | | -ISORT_VERSION = "isort==5.10.1" |
| 30 | +BLACK_VERSION = "black[jupyter]==23.7.0" |
| 31 | +ISORT_VERSION = "isort==5.11.0" |
| 32 | + |
31 | 33 | LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] |
32 | 34 |
|
| 35 | + |
33 | 36 | DEFAULT_PYTHON_VERSION = "3.9" |
34 | 37 |
|
35 | | -UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"] |
| 38 | +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11"] |
36 | 39 | UNIT_TEST_STANDARD_DEPENDENCIES = [ |
37 | 40 | "mock", |
38 | 41 | "asyncmock", |
39 | 42 | "pytest", |
40 | 43 | "pytest-cov", |
41 | 44 | "pytest-asyncio", |
42 | 45 | ] |
43 | | -UNIT_TEST_EXTERNAL_DEPENDENCIES = [] |
44 | | -UNIT_TEST_LOCAL_DEPENDENCIES = [] |
45 | | -UNIT_TEST_DEPENDENCIES = [] |
46 | | -UNIT_TEST_EXTRAS = [] |
47 | | -UNIT_TEST_EXTRAS_BY_PYTHON = {} |
| 46 | +UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] |
| 47 | +UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = [] |
| 48 | +UNIT_TEST_DEPENDENCIES: List[str] = [] |
| 49 | +UNIT_TEST_EXTRAS: List[str] = [] |
| 50 | +UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} |
48 | 51 |
|
49 | | -SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"] |
| 52 | +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11"] |
50 | 53 | SYSTEM_TEST_STANDARD_DEPENDENCIES = [ |
51 | 54 | "mock", |
52 | 55 | "pytest", |
53 | 56 | "google-cloud-testutils", |
54 | 57 | ] |
55 | | -SYSTEM_TEST_EXTERNAL_DEPENDENCIES = [] |
56 | | -SYSTEM_TEST_LOCAL_DEPENDENCIES = [] |
57 | | -SYSTEM_TEST_DEPENDENCIES = [] |
58 | | -SYSTEM_TEST_EXTRAS = [] |
59 | | -SYSTEM_TEST_EXTRAS_BY_PYTHON = {} |
| 58 | +SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] |
| 59 | +SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = [] |
| 60 | +SYSTEM_TEST_DEPENDENCIES: List[str] = [] |
| 61 | +SYSTEM_TEST_EXTRAS: List[str] = [] |
| 62 | +SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} |
60 | 63 |
|
61 | 64 | CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() |
62 | 65 |
|
@@ -88,6 +91,7 @@ def lint(session): |
88 | 91 | "--check", |
89 | 92 | *LINT_PATHS, |
90 | 93 | ) |
| 94 | + |
91 | 95 | session.run("flake8", "google", "tests") |
92 | 96 |
|
93 | 97 |
|
@@ -187,7 +191,6 @@ def unit(session): |
187 | 191 |
|
188 | 192 |
|
189 | 193 | def install_systemtest_dependencies(session, *constraints): |
190 | | - |
191 | 194 | # Use pre-release gRPC for system tests. |
192 | 195 | # Exclude version 1.52.0rc1 which has a known issue. |
193 | 196 | # See https://github.com/grpc/grpc/issues/32163 |
|
0 commit comments