gunicorn/tox.ini
Benoit Chesneau 0e175a2d34 fix: resolve lint issues and remove obsolete Sphinx references
- Fix lint issues in test_gthread.py:
  - Remove unused imports (queue, partial, http)
  - Move fcntl import to top level
  - Remove unused variable assignment
  - Replace unnecessary lambdas with method references
  - Add blank lines before nested function definitions (E306)

- Update .github/workflows/lint.yml:
  - Replace Sphinx docs check with MkDocs settings generator
  - docs/source directory no longer exists after MkDocs migration

- Update tox.ini:
  - Remove docs/source/*.rst lint (directory doesn't exist)
  - Add tests/test_gthread.py to lint targets
2026-01-23 09:56:32 +01:00

68 lines
1.6 KiB
INI

[tox]
envlist =
py{312,313},
lint,
docs-lint,
pycodestyle,
run-entrypoint,
run-module,
[testenv]
package = editable
commands = pytest --cov=gunicorn {posargs}
deps =
-rrequirements_test.txt
[testenv:run-entrypoint]
package = wheel
deps =
# entry point: console script (provided by setuptools from pyproject.toml)
commands = python -c 'import subprocess; cmd_out = subprocess.check_output(["gunicorn", "--version"])[:79].decode("utf-8", errors="replace"); print(cmd_out); assert cmd_out.startswith("gunicorn ")'
[testenv:run-module]
package = wheel
deps =
# runpy (provided by module.__main__)
commands = python -c 'import sys,subprocess; cmd_out = subprocess.check_output([sys.executable, "-m", "gunicorn", "--version"])[:79].decode("utf-8", errors="replace"); print(cmd_out); assert cmd_out.startswith("gunicorn ")'
[testenv:lint]
no_package = true
commands =
pylint -j0 \
--max-line-length=120 \
gunicorn \
tests/test_arbiter.py \
tests/test_config.py \
tests/test_gthread.py \
tests/test_http.py \
tests/test_invalid_requests.py \
tests/test_logger.py \
tests/test_pidfile.py \
tests/test_sock.py \
tests/test_ssl.py \
tests/test_statsd.py \
tests/test_systemd.py \
tests/test_util.py \
tests/test_valid_requests.py
deps =
pylint==3.3.2
[testenv:docs-lint]
no_package = true
deps =
restructuredtext_lint
pygments
commands =
rst-lint README.rst docs/README.rst
[testenv:pycodestyle]
no_package = true
commands =
pycodestyle gunicorn
deps =
pycodestyle
[pycodestyle]
max-line-length = 120
ignore = E129,W503,W504,W606