From 3831987d9d56c8ebf872d455ba2f2815c1f72b3b Mon Sep 17 00:00:00 2001 From: dece Date: Mon, 15 Aug 2022 13:20:25 +0200 Subject: [PATCH] bot: make mypy happy with the plugins folder (meh) --- edmond/bot.py | 5 ++++- edmond/plugins/__init__.py | 0 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 edmond/plugins/__init__.py diff --git a/edmond/bot.py b/edmond/bot.py index 67a236a..cbe63fb 100644 --- a/edmond/bot.py +++ b/edmond/bot.py @@ -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}") diff --git a/edmond/plugins/__init__.py b/edmond/plugins/__init__.py new file mode 100644 index 0000000..e69de29