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
Some checks failed
CI / Lint, test, and build (push) Failing after 39s
This commit is contained in:
parent
0363c37202
commit
979fbb0e64
3 changed files with 8 additions and 2 deletions
6
.flake8
Normal file
6
.flake8
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[flake8]
|
||||||
|
exclude = .git, .venv, output, static/icons
|
||||||
|
max-line-length = 160
|
||||||
|
per-file-ignores =
|
||||||
|
tests/test_*.py: E402
|
||||||
|
|
|
@ -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))
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue