mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 15:43:06 +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
8aeee0d55a
commit
1979089fcf
@ -59,22 +59,9 @@ unfixable = []
|
|||||||
"S607", # Allow partial executable path in tests
|
"S607", # Allow partial executable path in tests
|
||||||
"PLC0415", # Allow late imports for test isolation
|
"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" = [
|
"poker_modifier_app/poker_modifier_app.py" = [
|
||||||
"FBT003", # Boolean positional values in tkinter API calls
|
"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" = [
|
"python_pkg/keyboard_coop/main.py" = [
|
||||||
"FBT003", # Boolean positional values in pygame API calls (e.g., font.render)
|
"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:
|
def _call_engine(self, args: list[str], *, timeout: float) -> str:
|
||||||
try:
|
try:
|
||||||
proc = subprocess.run(
|
proc = subprocess.run( # noqa: S603 - trusted internal C engine binary
|
||||||
[self.engine_path, *args],
|
[self.engine_path, *args],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
"""Pytest configuration and fixtures for lichess_bot tests."""
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user