File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 3939 # You can opt out from the test for specific Python versions.
4040 'ignored_versions' : ["2.7" ],
4141
42+ # Old samples are opted out of enforcing Python type hints
43+ # All new samples should feature them
44+ 'enforce_type_hints' : False ,
45+
4246 # An envvar key for determining the project id to use. Change it
4347 # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
4448 # build specific Cloud project. You can also use your own string
@@ -133,7 +137,10 @@ def _determine_local_import_names(start_dir):
133137
134138@nox .session
135139def lint (session ):
136- session .install ("flake8" , "flake8-import-order" )
140+ if not TEST_CONFIG ['enforce_type_hints' ]:
141+ session .install ("flake8" , "flake8-import-order" )
142+ else :
143+ session .install ("flake8" , "flake8-import-order" , "flake8-annotations" )
137144
138145 local_names = _determine_local_import_names ("." )
139146 args = FLAKE8_COMMON_ARGS + [
Original file line number Diff line number Diff line change 2323TEST_CONFIG_OVERRIDE = {
2424 # You can opt out from the test for specific Python versions.
2525 'ignored_versions' : ["2.7" ],
26+ # Old samples are opted out of enforcing Python type hints
27+ # All new samples should feature them
28+ 'enforce_type_hints' : False ,
2629
2730 # An envvar key for determining the project id to use. Change it
2831 # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
You can’t perform that action at this time.
0 commit comments