mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 14:43:01 +02:00
fix(lint): fix S603 in engine.py and D100 in conftest.py
- Add noqa: S603 for trusted internal C engine subprocess call - Add module docstring to conftest.py - Remove per-file ignores for engine.py and conftest.py from pyproject.toml
This commit is contained in:
parent
dc12f22c3e
commit
bbd2df8c7b
@ -59,22 +59,9 @@ unfixable = []
|
||||
"S607", # Allow partial executable path in tests
|
||||
"PLC0415", # Allow late imports for test isolation
|
||||
]
|
||||
"**/conftest.py" = [
|
||||
"D100", # Allow missing module docstring
|
||||
"D103", # Allow missing function docstring
|
||||
]
|
||||
"poker_modifier_app/poker_modifier_app.py" = [
|
||||
"FBT003", # Boolean positional values in tkinter API calls
|
||||
]
|
||||
"python_pkg/lichess_bot/main.py" = [
|
||||
"C901", # Complex functions handling game lifecycle (run_bot, handle_game)
|
||||
"PLR0912", # Complex nested game event handling with many branches
|
||||
"PLR0915", # Long function handling complete game lifecycle
|
||||
"S603", # Subprocess call for analysis script
|
||||
]
|
||||
"python_pkg/lichess_bot/engine.py" = [
|
||||
"S603", # Subprocess for engine communication
|
||||
]
|
||||
"python_pkg/keyboard_coop/main.py" = [
|
||||
"FBT003", # Boolean positional values in pygame API calls (e.g., font.render)
|
||||
]
|
||||
|
||||
@ -53,7 +53,7 @@ class RandomEngine:
|
||||
|
||||
def _call_engine(self, args: list[str], *, timeout: float) -> str:
|
||||
try:
|
||||
proc = subprocess.run(
|
||||
proc = subprocess.run( # noqa: S603 - trusted internal C engine binary
|
||||
[self.engine_path, *args],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
"""Pytest configuration and fixtures for lichess_bot tests."""
|
||||
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user