Skip to content

Commit 73c6568

Browse files
committed
Corrects linting errors, adjusts System Python versions
1 parent 3026ae1 commit 73c6568

1 file changed

Lines changed: 7 additions & 26 deletions

File tree

packages/google-cloud-bigquery/noxfile.py

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,19 @@
3030
"benchmark",
3131
"docs",
3232
"google",
33-
"samples",
34-
"samples/tests",
3533
"tests",
3634
"noxfile.py",
3735
"setup.py",
3836
)
3937

4038
DEFAULT_PYTHON_VERSION = "3.14"
41-
SYSTEM_TEST_PYTHON_VERSIONS = ["3.9", "3.11", "3.12", "3.13", "3.14"]
4239
UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
4340
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
4441

4542
ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS)
4643
ALL_PYTHON.extend(["3.7"])
4744

45+
SYSTEM_TEST_PYTHON_VERSIONS = ALL_PYTHON
4846

4947
def _calculate_duration(func):
5048
"""This decorator prints the execution time for the decorated function."""
@@ -159,14 +157,17 @@ def unit(session, test_type):
159157
install_extras = True
160158
if test_type == "unit_noextras":
161159
# unit_noextras only runs on the oldest and newest Python versions
162-
if session.python not in (UNIT_TEST_PYTHON_VERSIONS[0], UNIT_TEST_PYTHON_VERSIONS[-1]):
160+
if session.python not in (
161+
UNIT_TEST_PYTHON_VERSIONS[0],
162+
UNIT_TEST_PYTHON_VERSIONS[-1],
163+
):
163164
session.skip(
164165
f"unit_noextras only runs on the oldest ({UNIT_TEST_PYTHON_VERSIONS[0]}) "
165166
f"and newest ({UNIT_TEST_PYTHON_VERSIONS[-1]}) supported Python versions"
166167
)
167-
168+
168169
install_extras = False
169-
170+
170171
# Install optional dependencies that are out-of-date to see that
171172
# we fail gracefully.
172173
# https://github.com/googleapis/google-cloud-python/issues/933
@@ -297,18 +298,6 @@ def snippets(session):
297298
session.run(
298299
"py.test", "-n=auto", os.path.join("docs", "snippets.py"), *session.posargs
299300
)
300-
session.run(
301-
"py.test",
302-
"-n=auto",
303-
"samples",
304-
"-W default::PendingDeprecationWarning",
305-
"--ignore=samples/desktopapp",
306-
"--ignore=samples/magics",
307-
"--ignore=samples/geography",
308-
"--ignore=samples/notebooks",
309-
"--ignore=samples/snippets",
310-
*session.posargs,
311-
)
312301

313302

314303
@nox.session(python=DEFAULT_PYTHON_VERSION)
@@ -423,13 +412,6 @@ def prerelease_deps(session):
423412
"tests/system",
424413
"-W default::PendingDeprecationWarning",
425414
)
426-
427-
session.run(
428-
"py.test",
429-
"-n=auto",
430-
"samples/tests",
431-
"-W default::PendingDeprecationWarning",
432-
)
433415
else:
434416
session.log(
435417
"Skipping system tests because GOOGLE_APPLICATION_CREDENTIALS is not set."
@@ -450,7 +432,6 @@ def lint(session):
450432
session.run("python", "-m", "pip", "freeze")
451433
session.run("flake8", os.path.join("google", "cloud", "bigquery"))
452434
session.run("flake8", "tests")
453-
session.run("flake8", os.path.join("docs", "samples"))
454435
session.run("flake8", os.path.join("docs", "snippets.py"))
455436
session.run("flake8", "benchmark")
456437
session.run("black", "--check", *BLACK_PATHS)

0 commit comments

Comments
 (0)