mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 12:28:51 -06:00
refactor: put scripts/ on the test path once
tests/__init__ now puts the repository root and scripts/ on sys.path, so no test module inserts them and every import sits in the import block. ruff accepts the bare `import tests` the modules keep for its side effects. The last suppressions go: helper test modules import as tests.<name>, files open in with blocks, lambdas become functions.
This commit is contained in:
1 parent
8f1b88bb7e
commit
5f18caec31
281 files changed
+1036
-1659
No files matched your search
@@ -10,19 +10,15 @@ extractor writes.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import tests # noqa: F401 offline, scratch under tmp/, the suite's own cache
|
||||
import tests
|
||||
|
||||
import sys
|
||||
import textwrap
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
sys.path.insert(0, str(REPO_ROOT / "scripts"))
|
||||
|
||||
from launchers import handed_directories, standalone_bindings # noqa: E402
|
||||
from scraper import retrobat_launchers as rl # noqa: E402
|
||||
from scraper.batocera_launchers import ( # noqa: E402
|
||||
from launchers import handed_directories, standalone_bindings
|
||||
from scraper import retrobat_launchers as rl
|
||||
from scraper.batocera_launchers import (
|
||||
GENERATORS,
|
||||
IMPORTER,
|
||||
PATHS_MODULE,
|
||||
@@ -32,6 +28,8 @@ from scraper.batocera_launchers import ( # noqa: E402
|
||||
working_directories,
|
||||
)
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
PATCH = "package/batocera/emulators/citron/002-adjust-paths.patch"
|
||||
PATCH_TEXT = textwrap.dedent("""\
|
||||
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp
|
||||
|
||||
Reference in new issue
Block a user