diff options
author | Michele Simionato <michele.simionato@gmail.com> | 2018-01-14 07:55:15 +0100 |
---|---|---|
committer | Michele Simionato <michele.simionato@gmail.com> | 2018-01-14 07:55:15 +0100 |
commit | 6181de665e6c44d5607bf8cf117a2c66623f7b4f (patch) | |
tree | 580eac71e69338a1c3892ed0f1496b20dc160c60 | |
parent | 6e4cb6763624e199cba37053f4a530630204250f (diff) | |
parent | 3886353eb19cf81dec4f99098febb8e28640ad51 (diff) | |
download | python-decorator-git-6181de665e6c44d5607bf8cf117a2c66623f7b4f.tar.gz |
Merge branch 'master' of github.com:micheles/decorator into 4.2.0
-rw-r--r-- | src/decorator.py | 7 |
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 ############################ # |