Skip to content

Commit 678845f

Browse files
chore: re-generated to pick up changes from synthtool (#95)
* changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * fix(python_library): fix external unit test dependencies I recently submitted https://github.com/googleapis/synthtool/pull/811/files, allowing external dependencies for unit tests. This fixes a small missing comma bug Source-Author: Daniel Sanche <d.sanche14@gmail.com> Source-Date: Thu Oct 29 16:58:01 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 6542bd723403513626f61642fc02ddca528409aa Source-Link: googleapis/synthtool@6542bd7 * chore: add type hint check Source-Author: Leah E. Cole <6719667+leahecole@users.noreply.github.com> Source-Date: Wed Nov 4 17:36:32 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 3d3e94c4e02370f307a9a200b0c743c3d8d19f29 Source-Link: googleapis/synthtool@3d3e94c
1 parent 9910616 commit 678845f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

bigquery_storage/quickstart/noxfile.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
TEST_CONFIG = {
3939
# You can opt out from the test for specific Python versions.
4040
"ignored_versions": ["2.7"],
41+
# Old samples are opted out of enforcing Python type hints
42+
# All new samples should feature them
43+
"enforce_type_hints": False,
4144
# An envvar key for determining the project id to use. Change it
4245
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
4346
# build specific Cloud project. You can also use your own string
@@ -130,7 +133,10 @@ def _determine_local_import_names(start_dir):
130133

131134
@nox.session
132135
def lint(session):
133-
session.install("flake8", "flake8-import-order")
136+
if not TEST_CONFIG["enforce_type_hints"]:
137+
session.install("flake8", "flake8-import-order")
138+
else:
139+
session.install("flake8", "flake8-import-order", "flake8-annotations")
134140

135141
local_names = _determine_local_import_names(".")
136142
args = FLAKE8_COMMON_ARGS + [

bigquery_storage/to_dataframe/noxfile.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
TEST_CONFIG = {
3939
# You can opt out from the test for specific Python versions.
4040
"ignored_versions": ["2.7"],
41+
# Old samples are opted out of enforcing Python type hints
42+
# All new samples should feature them
43+
"enforce_type_hints": False,
4144
# An envvar key for determining the project id to use. Change it
4245
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
4346
# build specific Cloud project. You can also use your own string
@@ -130,7 +133,10 @@ def _determine_local_import_names(start_dir):
130133

131134
@nox.session
132135
def lint(session):
133-
session.install("flake8", "flake8-import-order")
136+
if not TEST_CONFIG["enforce_type_hints"]:
137+
session.install("flake8", "flake8-import-order")
138+
else:
139+
session.install("flake8", "flake8-import-order", "flake8-annotations")
134140

135141
local_names = _determine_local_import_names(".")
136142
args = FLAKE8_COMMON_ARGS + [

0 commit comments

Comments
 (0)