ci(lint): configure flake8 excludes/line-length; fix F541 and F401 in tests
Some checks failed
CI / Lint, test, and build (push) Failing after 39s

This commit is contained in:
ngxstat-bot 2025-08-16 05:14:01 -05:00
commit 979fbb0e64
3 changed files with 8 additions and 2 deletions

6
.flake8 Normal file
View file

@ -0,0 +1,6 @@
[flake8]
exclude = .git, .venv, output, static/icons
max-line-length = 160
per-file-ignores =
tests/test_*.py: E402

View file

@ -1,6 +1,6 @@
import sys import sys
from pathlib import Path from pathlib import Path
import pytest import pytest # noqa: F401
REPO_ROOT = Path(__file__).resolve().parents[1] REPO_ROOT = Path(__file__).resolve().parents[1]
sys.path.append(str(REPO_ROOT)) sys.path.append(str(REPO_ROOT))

View file

@ -16,7 +16,7 @@ def test_script_invokes_commands(tmp_path):
python_stub = tmp_path / "python" python_stub = tmp_path / "python"
python_stub.write_text(f'#!/usr/bin/env bash\necho "$*" >> "{calls}"\n') python_stub.write_text(f'#!/usr/bin/env bash\necho "$*" >> "{calls}"\n')
python_stub.chmod(0o755) python_stub.chmod(0o755)
(tmp_path / "python3").write_text(f"#!/usr/bin/env bash\nexit 0\n") (tmp_path / "python3").write_text("#!/usr/bin/env bash\nexit 0\n")
(tmp_path / "python3").chmod(0o755) (tmp_path / "python3").chmod(0o755)
env = os.environ.copy() env = os.environ.copy()