From 4566c9141fc6903c998206196a2164f9d0d8e405 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 10 Feb 2022 13:17:43 -0500 Subject: [PATCH] test --- sopel_SpiceBot_Runtime_Commands/__init__.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sopel_SpiceBot_Runtime_Commands/__init__.py b/sopel_SpiceBot_Runtime_Commands/__init__.py index bc60c2e..7ee0f37 100644 --- a/sopel_SpiceBot_Runtime_Commands/__init__.py +++ b/sopel_SpiceBot_Runtime_Commands/__init__.py @@ -1,12 +1,6 @@ -#!/usr/bin/python -# -*- encoding: utf-8 -*- - import os -import glob - -all_list = list() -for f in glob.glob(os.path.dirname(__file__)+"/*.py"): - if os.path.isfile(f) and not os.path.basename(f).startswith('_'): - all_list.append(os.path.basename(f)[:-3]) - -__all__ = all_list +for module in os.listdir(os.path.dirname(__file__)): + if module == '__init__.py' or module[-3:] != '.py': + continue + __import__(".%s" % module[:-3], locals(), globals()) +del module