diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2018-01-14 08:11:05 +0100 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2018-01-14 08:11:05 +0100 |
| commit | 77ccc346a43f419d0cb8ca6b1593ae70b6b951d8 (patch) | |
| tree | 7f39eb5151dc84e00f67fea879a26dd86dcbb80c | |
| parent | 730113abbee7793749f6b1abca5b73aad5ab1d8d (diff) | |
| parent | 3886353eb19cf81dec4f99098febb8e28640ad51 (diff) | |
| download | python-decorator-git-77ccc346a43f419d0cb8ca6b1593ae70b6b951d8.tar.gz | |
Merge branch 'master' of github.com:micheles/decorator
| -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 788f4bb..e213bc3 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -298,7 +298,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 ############################ # |
