File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ def get_pytest_env_vars() -> dict[str, str]:
97
97
98
98
INSTALL_LIBRARY_FROM_SOURCE = bool (os .environ .get ("INSTALL_LIBRARY_FROM_SOURCE" , False ))
99
99
100
+ # Use the oldest tested Python version for linting (defaults to 3.10)
101
+ LINTING_VERSION = "3.10"
102
+ if len (TESTED_VERSIONS ) > 0 :
103
+ LINTING_VERSION = TESTED_VERSIONS [0 ]
104
+
100
105
# Error if a python version is missing
101
106
nox .options .error_on_missing_interpreters = True
102
107
@@ -146,7 +151,7 @@ def _determine_local_import_names(start_dir: str) -> list[str]:
146
151
]
147
152
148
153
149
- @nox .session
154
+ @nox .session ( python = LINTING_VERSION )
150
155
def lint (session : nox .sessions .Session ) -> None :
151
156
if not TEST_CONFIG ["enforce_type_hints" ]:
152
157
session .install ("flake8" , "flake8-import-order" )
@@ -167,7 +172,7 @@ def lint(session: nox.sessions.Session) -> None:
167
172
#
168
173
169
174
170
- @nox .session
175
+ @nox .session ( python = LINTING_VERSION )
171
176
def blacken (session : nox .sessions .Session ) -> None :
172
177
session .install ("black" )
173
178
python_files = [path for path in os .listdir ("." ) if path .endswith (".py" )]
You can’t perform that action at this time.
0 commit comments