File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ def get_pytest_env_vars() -> dict[str, str]:
9797
9898INSTALL_LIBRARY_FROM_SOURCE = bool (os .environ .get ("INSTALL_LIBRARY_FROM_SOURCE" , False ))
9999
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+
100105# Error if a python version is missing
101106nox .options .error_on_missing_interpreters = True
102107
@@ -146,7 +151,7 @@ def _determine_local_import_names(start_dir: str) -> list[str]:
146151]
147152
148153
149- @nox .session
154+ @nox .session ( python = LINTING_VERSION )
150155def lint (session : nox .sessions .Session ) -> None :
151156 if not TEST_CONFIG ["enforce_type_hints" ]:
152157 session .install ("flake8" , "flake8-import-order" )
@@ -167,7 +172,7 @@ def lint(session: nox.sessions.Session) -> None:
167172#
168173
169174
170- @nox .session
175+ @nox .session ( python = LINTING_VERSION )
171176def blacken (session : nox .sessions .Session ) -> None :
172177 session .install ("black" )
173178 python_files = [path for path in os .listdir ("." ) if path .endswith (".py" )]
You can’t perform that action at this time.
0 commit comments