mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 06:18:51 -06:00
refactor: split common.py into three packages
core: cli (run_cli, input errors, name hints), github (token), paths. model: sources, database, composition, registry, platforms, declarations, targets, systems, profiles, cliargs. resolve: content, ownership, datadirs, archives, localfile, directories, layout, contentlayout, standalone, grouping, cores. Definitions move verbatim; common.py and its re-exports are gone and every importer, patch target and code-in-string names the new home. A test that stubbed common.load_platform_config stubs each module that reads the loader by its own name.
This commit is contained in:
1 parent
c784aef883
commit
83cfa6fd0f
281 files changed
+7036
-6794
No files matched your search
@@ -21,7 +21,7 @@ from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
import common
|
||||
from model.platforms import _platform_config_cache
|
||||
import generate_db
|
||||
import generate_pack as builder
|
||||
from verify import Status, verify_platform
|
||||
@@ -49,7 +49,7 @@ class TwinDeclarationStatus(unittest.TestCase):
|
||||
Path("platforms/_registry.yml").write_text(
|
||||
yaml.dump({"platforms": {"twin": {"config": "twin.yml"}}})
|
||||
)
|
||||
self.addCleanup(common._platform_config_cache.clear)
|
||||
self.addCleanup(_platform_config_cache.clear)
|
||||
|
||||
def tearDown(self):
|
||||
os.chdir(self._cwd)
|
||||
@@ -66,7 +66,7 @@ class TwinDeclarationStatus(unittest.TestCase):
|
||||
},
|
||||
}
|
||||
Path("platforms/twin.yml").write_text(yaml.dump(config))
|
||||
common._platform_config_cache.clear()
|
||||
_platform_config_cache.clear()
|
||||
return config
|
||||
|
||||
def _check(self, config: dict) -> None:
|
||||
|
||||
Reference in new issue
Block a user