summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decorator.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/decorator.py b/src/decorator.py
index 858a921..3aa7313 100644
--- a/src/decorator.py
+++ b/src/decorator.py
@@ -312,7 +312,12 @@ elif n_args == 4: # (self, gen, args, kwds) Python 3.5
return _GeneratorContextManager.__init__(self, g, a, k)
ContextManager.__init__ = __init__
-contextmanager = decorator(ContextManager)
+_contextmanager = decorator(ContextManager)
+
+
+def contextmanager(func):
+ # Enable Pylint config: contextmanager-decorators=decorator.contextmanager
+ return _contextmanager(func)
# ############################ dispatch_on ############################ #