Skip to content

Commit 0bff027

Browse files
committed
updates nox.options.sessions and removes samples related session
1 parent 0c53b03 commit 0bff027

1 file changed

Lines changed: 4 additions & 40 deletions

File tree

packages/google-cloud-bigquery/noxfile.py

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,19 @@ def wrapper(*args, **kwargs):
6868

6969
# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
7070
nox.options.sessions = [
71-
"unit_noextras",
7271
"unit",
72+
"unit_noextras",
73+
"mypy",
7374
"system",
7475
"snippets",
7576
"cover",
77+
"prerelease_deps",
7678
"lint",
7779
"lint_setup_py",
7880
"blacken",
79-
"mypy",
80-
"mypy_samples",
8181
"docs",
82-
"prerelease_deps",
8382
"core_deps_from_source",
83+
"format",
8484
]
8585

8686

@@ -266,42 +266,6 @@ def system(session):
266266
)
267267

268268

269-
@nox.session(python=DEFAULT_PYTHON_VERSION)
270-
@_calculate_duration
271-
def mypy_samples(session):
272-
"""Run type checks with mypy."""
273-
274-
session.install("pytest")
275-
for requirements_path in CURRENT_DIRECTORY.glob("samples/*/requirements.txt"):
276-
session.install("-r", str(requirements_path))
277-
session.install(MYPY_VERSION)
278-
279-
# requirements.txt might include this package. Install from source so that
280-
# we can author samples with unreleased features.
281-
session.install("-e", ".[all]")
282-
283-
# Just install the dependencies' type info directly, since "mypy --install-types"
284-
# might require an additional pass.
285-
session.install(
286-
"types-mock",
287-
"types-pytz",
288-
"types-protobuf!=4.24.0.20240106", # This version causes an error: 'Module "google.oauth2" has no attribute "service_account"'
289-
"types-python-dateutil",
290-
"types-requests",
291-
"types-setuptools",
292-
)
293-
294-
session.run("python", "-m", "pip", "freeze")
295-
296-
session.run(
297-
"mypy",
298-
"--config-file",
299-
str(CURRENT_DIRECTORY / "samples" / "mypy.ini"),
300-
"--no-incremental", # Required by warn-unused-configs from mypy.ini to work
301-
"samples/",
302-
)
303-
304-
305269
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
306270
@_calculate_duration
307271
def snippets(session):

0 commit comments

Comments
 (0)