3535]
3636
3737
38- def _skip_if_37 (session ):
39- if session .python in ("3.7" ,):
40- session .skip ("Python 3.7 is no longer supported" )
38+ def _skip_python_session (session , versions ):
39+ if session .python in versions :
40+ session .skip (
41+ f"Python { session .python } is either not supported or the tests are disabled temporarily."
42+ )
4143
4244
4345@nox .session (python = DEFAULT_PYTHON_VERSION )
@@ -71,7 +73,6 @@ def format(session):
7173 """
7274 Run ruff to sort imports and format code.
7375 """
74- _skip_if_37 (session )
7576
7677 # 1. Install ruff (skipped automatically if you run with --no-venv)
7778 session .install (RUFF_VERSION )
@@ -125,15 +126,14 @@ def lint(session):
125126@nox .session (python = DEFAULT_PYTHON_VERSION )
126127def lint_setup_py (session ):
127128 """Lint setup.py."""
128- _skip_if_37 (session )
129129 session .install ("setuptools" , "flake8" )
130130 session .run ("flake8" , "setup.py" )
131131
132132
133133@nox .session (python = UNIT_TEST_PYTHON_VERSIONS )
134134def unit (session ):
135135 """Run unit tests."""
136- _skip_if_37 (session )
136+ _skip_python_session (session , [ "3.7" , "3.8" , "3.9" , "3.11" , "3.12" , "3.13" , "3.14" ] )
137137 session .install ("-r" , "requirements.txt" )
138138 session .install ("pytest" )
139139 session .run ("pytest" , "tests" )
@@ -142,7 +142,6 @@ def unit(session):
142142@nox .session (python = "3.10" )
143143def docs (session ):
144144 """Build documentation."""
145- _skip_if_37 (session )
146145 session .install ("-r" , "requirements.txt" )
147146 session .install ("sphinx" , "sphinx-docfx-yaml" )
148147 session .run ("sphinx-build" , "-b" , "html" , "docs" , "docs/_build/html" )
0 commit comments