summaryrefslogtreecommitdiff
path: root/alembic/op.py
diff options
context:
space:
mode:
Diffstat (limited to 'alembic/op.py')
-rw-r--r--alembic/op.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/alembic/op.py b/alembic/op.py
index 8a5e0fa..9f2a26b 100644
--- a/alembic/op.py
+++ b/alembic/op.py
@@ -1,19 +1,6 @@
from alembic.operations import Operations
+from alembic import util
# create proxy functions for
# each method on the Operations class.
-
-# TODO: this is a quick and dirty version of this.
-# Ideally, we'd be duplicating method signatures
-# and such, using eval(), etc.
-
-_proxy = None
-def _create_op_proxy(name):
- def go(*arg, **kw):
- return getattr(_proxy, name)(*arg, **kw)
- go.__name__ = name
- return go
-
-for methname in dir(Operations):
- if not methname.startswith('_'):
- locals()[methname] = _create_op_proxy(methname) \ No newline at end of file
+util.create_module_class_proxy(Operations, globals(), locals())