1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

plugins: Comment *why* the "load plugins that are packages" first is there

It's *NOT* that it will actually load the plugin *as* a package, as the code
explicitly only loads `load.py` still.
This commit is contained in:
Athanasius 2022-12-26 19:48:38 +00:00
parent 81a8122c59
commit 18833c5e36
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -160,7 +160,10 @@ def load_plugins(master: tk.Tk) -> None: # noqa: CCR001
sys.path.append(config.plugin_dir)
found = []
# Load any plugins that are also packages first
# Load any plugins that are also packages first, but note it's *still*
# 100% relying on there being a `load.py`, as only that will be loaded.
# The intent here is to e.g. have EDMC-Overlay load before any plugins
# that depend on it.
for name in sorted(
os.listdir(config.plugin_dir_path),
key=lambda n: (not os.path.isfile(os.path.join(config.plugin_dir_path, n, '__init__.py')), n.lower())