File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66"""
77import nox
88
9- PYTHON_DEFAULT_VERSION = "3.10"
10- PYTHON_ALL_VERSIONS = ["3.7" , "3.8" , "3.9" , "3.10" ]
119LINT_DEPENDENCIES = [
1210 "isort" ,
1311 "black" ,
1412 "flake8" ,
1513]
14+ LINT_PATH = [
15+ "test" ,
16+ ]
1617
1718
18- @nox .session (name = "isort" , python = PYTHON_DEFAULT_VERSION )
19+ @nox .session (name = "isort" )
1920def isort (session ):
2021 """Run isort code formatter."""
2122 session .install ("isort" )
@@ -27,7 +28,7 @@ def isort(session):
2728 )
2829
2930
30- @nox .session (name = "black" , python = PYTHON_DEFAULT_VERSION )
31+ @nox .session (name = "black" )
3132def blacken (session ):
3233 """Run black code formatter."""
3334 session .install (
@@ -40,7 +41,7 @@ def blacken(session):
4041 )
4142
4243
43- @nox .session (name = "flake8" , python = PYTHON_DEFAULT_VERSION )
44+ @nox .session (name = "flake8" )
4445def flake (session ):
4546 """Run black code formatter."""
4647 session .install ("flake8" )
@@ -50,23 +51,23 @@ def flake(session):
5051 )
5152
5253
53- @nox .session (name = "lint" , python = PYTHON_ALL_VERSIONS )
54+ @nox .session (name = "lint" )
5455def lint (session ):
5556 """Run linters."""
5657 session .install (* LINT_DEPENDENCIES )
5758 session .run (
5859 "isort" ,
5960 "--profile" ,
6061 "black" ,
61- "." ,
62+ * LINT_PATH ,
6263 )
6364 session .run (
6465 "black" ,
6566 "--check" ,
6667 "--verbose" ,
67- "." ,
68+ * LINT_PATH ,
6869 )
6970 session .run (
7071 "flake8" ,
71- "." ,
72+ * LINT_PATH ,
7273 )
You can’t perform that action at this time.
0 commit comments