1717
1818from __future__ import absolute_import
1919import os
20- import shutil
21- import sys
2220import nox
2321
2422BLACK_PATHS = ["google" , "tests" ]
2523
2624if os .path .exists ("samples" ):
2725 BLACK_PATHS .append ("samples" )
2826
27+
2928@nox .session
3029def lint (session ):
3130 """Run linters.
3231 Returns a failure if the linters find linting errors or sufficiently
3332 serious code quality issues.
3433 """
3534 session .install (
36- "flake8" , "flake8-annotations" , "black" , "mypy" , "sqlalchemy-stubs" ,
37- "types-pkg-resources" , "types-PyMySQL" , "twine" )
35+ "flake8==4.0.1" ,
36+ "flake8-annotations==2.7.0" ,
37+ "black==21.12b0" ,
38+ "mypy==0.910" ,
39+ "sqlalchemy-stubs==0.4" ,
40+ "types-pkg-resources==0.1.3" ,
41+ "types-PyMySQL==1.0.6" ,
42+ "twine==3.7.1" ,
43+ )
3844 session .install ("-r" , "requirements.txt" )
3945 session .run ("black" , "--check" , * BLACK_PATHS )
4046 session .run ("flake8" , "google" , "tests" )
@@ -51,7 +57,7 @@ def blacken(session):
5157 That run uses an image that doesn't have 3.6 installed. Before updating this
5258 check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
5359 """
54- session .install ("black" )
60+ session .install ("black==21.12b0 " )
5561 session .run ("black" , * BLACK_PATHS )
5662
5763
@@ -79,15 +85,18 @@ def default(session, path):
7985def unit (session ):
8086 default (session , os .path .join ("tests" , "unit" ))
8187
88+
8289@nox .session (python = ["3.6" , "3.7" , "3.8" , "3.9" ])
8390def system (session ):
8491 default (session , os .path .join ("tests" , "system" ))
8592
93+
8694@nox .session (python = ["3.6" , "3.7" , "3.8" , "3.9" ])
8795def test (session ):
8896 default (session , os .path .join ("tests" , "unit" ))
8997 default (session , os .path .join ("tests" , "system" ))
9098
99+
91100# @nox.session(python="3.7")
92101# def cover(session):
93102# """Run the final coverage report.
0 commit comments