From 8e5b031cef06726203d8da325bb7898bff13cb62 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 7 Apr 2015 18:13:20 +0200 Subject: [PATCH 1/1] Remove example hook --- pirate_add/__init__.py | 18 ------------------ pirate_add/example.py | 2 -- 2 files changed, 20 deletions(-) delete mode 100644 pirate_add/__init__.py delete mode 100644 pirate_add/example.py diff --git a/pirate_add/__init__.py b/pirate_add/__init__.py deleted file mode 100644 index cdeb845..0000000 --- a/pirate_add/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -import os -import glob -import importlib - -__all__ = [os.path.basename(f)[:-3] - for f in glob.glob(os.path.dirname(__file__)+"/*.py") - if os.path.isfile(f) and not os.path.basename(f).startswith('_')] - -hooks = [] - -for module_name in __all__: - module = importlib.import_module('pirate_add.%s' % module_name) - module_hooks = [ - getattr(module, hook_name) - for hook_name in dir(module) - if hook_name.startswith('hook_') - ] - hooks += module_hooks diff --git a/pirate_add/example.py b/pirate_add/example.py deleted file mode 100644 index 3e4e41f..0000000 --- a/pirate_add/example.py +++ /dev/null @@ -1,2 +0,0 @@ -def hook_example(task): - task['description'] += "This was altered by hook" -- 2.39.5