bot: make mypy happy with the plugins folder (meh)

This commit is contained in:
dece 2022-08-15 13:20:25 +02:00
parent 24bf8d02d0
commit 3831987d9d
2 changed files with 4 additions and 1 deletions

View file

@ -133,7 +133,10 @@ class Bot(irc.client.SimpleIRCClient, Logger):
plugin_files = os.listdir(Path(__file__).parent / "plugins")
plugin_names = map(
lambda f: os.path.splitext(f)[0],
filter(lambda f: f.endswith(".py"), plugin_files),
filter(
lambda f: f.endswith(".py") and f != "__init__.py",
plugin_files,
),
)
for plugin_name in plugin_names:
module = importlib.import_module(f"edmond.plugins.{plugin_name}")

View file