From 7315da2ccbe2cdc2f090b98c41863b0d99bb2395 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 4 Apr 2022 10:29:55 +0200 Subject: [PATCH] AutoWorld: don't import __pycache__ --- worlds/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worlds/__init__.py b/worlds/__init__.py index e57b7b59..b9270836 100644 --- a/worlds/__init__.py +++ b/worlds/__init__.py @@ -13,7 +13,8 @@ for file in os.scandir(os.path.dirname(__file__)): world_folders.append(file.name) world_folders.sort() for world in world_folders: - importlib.import_module(f".{world}", "worlds") + if not world.startswith("_"): # prevent explicitly loading __pycache__ and allow _* names for non-world folders + importlib.import_module(f".{world}", "worlds") from .AutoWorld import AutoWorldRegister lookup_any_item_id_to_name = {}