Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1888)

Unified Diff: third_party/logilab/common/deprecation.py

Issue 753543006: pylint: upgrade to 1.4.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/logilab/common/dbf.py ('k') | third_party/logilab/common/optparser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/logilab/common/deprecation.py
diff --git a/third_party/logilab/common/deprecation.py b/third_party/logilab/common/deprecation.py
index 9ceff17c434b2ac37df7a395c763cfc1f3f770a6..1c81b6385d0a2e4b3b79030558b5b2560eb1d574 100644
--- a/third_party/logilab/common/deprecation.py
+++ b/third_party/logilab/common/deprecation.py
@@ -125,11 +125,12 @@ class DeprecationManager(object):
return self.class_deprecated(version)(old_name, (new_class,), clsdict)
except (NameError, TypeError):
# old-style class
+ warn = self.warn
class DeprecatedClass(new_class):
"""FIXME: There might be a better way to handle old/new-style class
"""
def __init__(self, *args, **kwargs):
- self.warn(version, message, stacklevel=3)
+ warn(version, message, stacklevel=3)
new_class.__init__(self, *args, **kwargs)
return DeprecatedClass
« no previous file with comments | « third_party/logilab/common/dbf.py ('k') | third_party/logilab/common/optparser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698