@@ -132,6 +132,10 @@ def unit_noextras(session):
132132def mypy (session ):
133133 """Run type checks with mypy."""
134134
135+ # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true.
136+ if os .environ .get ("RUN_LINTING_TYPING_TESTS" , "true" ) == "false" :
137+ session .skip ("RUN_LINTING_TYPING_TESTS is set to false, skipping" )
138+
135139 session .install ("-e" , ".[all]" )
136140 session .install (MYPY_VERSION )
137141
@@ -153,6 +157,10 @@ def pytype(session):
153157 # recent version avoids the error until a possibly better fix is found.
154158 # https://github.com/googleapis/python-bigquery/issues/655
155159
160+ # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true.
161+ if os .environ .get ("RUN_LINTING_TYPING_TESTS" , "true" ) == "false" :
162+ session .skip ("RUN_LINTING_TYPING_TESTS is set to false, skipping" )
163+
156164 session .install ("attrs==20.3.0" )
157165 session .install ("-e" , ".[all]" )
158166 session .install (PYTYPE_VERSION )
@@ -213,6 +221,10 @@ def system(session):
213221def mypy_samples (session ):
214222 """Run type checks with mypy."""
215223
224+ # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true.
225+ if os .environ .get ("RUN_LINTING_TYPING_TESTS" , "true" ) == "false" :
226+ session .skip ("RUN_LINTING_TYPING_TESTS is set to false, skipping" )
227+
216228 session .install ("pytest" )
217229 for requirements_path in CURRENT_DIRECTORY .glob ("samples/*/requirements.txt" ):
218230 session .install ("-r" , str (requirements_path ))
@@ -394,6 +406,10 @@ def lint(session):
394406 serious code quality issues.
395407 """
396408
409+ # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true.
410+ if os .environ .get ("RUN_LINTING_TYPING_TESTS" , "true" ) == "false" :
411+ session .skip ("RUN_LINTING_TYPING_TESTS is set to false, skipping" )
412+
397413 session .install ("flake8" , BLACK_VERSION )
398414 session .install ("-e" , "." )
399415 session .run ("flake8" , os .path .join ("google" , "cloud" , "bigquery" ))
@@ -408,6 +424,10 @@ def lint(session):
408424def lint_setup_py (session ):
409425 """Verify that setup.py is valid (including RST check)."""
410426
427+ # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true.
428+ if os .environ .get ("RUN_LINTING_TYPING_TESTS" , "true" ) == "false" :
429+ session .skip ("RUN_LINTING_TYPING_TESTS is set to false, skipping" )
430+
411431 session .install ("docutils" , "Pygments" )
412432 session .run ("python" , "setup.py" , "check" , "--restructuredtext" , "--strict" )
413433
@@ -418,6 +438,10 @@ def blacken(session):
418438 Format code to uniform standard.
419439 """
420440
441+ # Check the value of `RUN_LINTING_TYPING_TESTS` env var. It defaults to true.
442+ if os .environ .get ("RUN_LINTING_TYPING_TESTS" , "true" ) == "false" :
443+ session .skip ("RUN_LINTING_TYPING_TESTS is set to false, skipping" )
444+
421445 session .install (BLACK_VERSION )
422446 session .run ("black" , * BLACK_PATHS )
423447
0 commit comments