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

Unified Diff: pylib/gyp/common.py

Issue 252583009: Silence pylint for the imported OrderedSet class. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: OrderedSet pylint: Moved comment Created 6 years, 8 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/common.py
diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py
index d7e860184cbdc7fb2af6eab61c25978d60ec7539..df71d973e11d87727822651dcf54fdec80ac7078 100644
--- a/pylib/gyp/common.py
+++ b/pylib/gyp/common.py
@@ -496,9 +496,9 @@ class OrderedSet(collections.MutableSet):
def discard(self, key):
if key in self.map:
- key, prev, next = self.map.pop(key)
- prev[2] = next
- next[1] = prev
+ key, prev_item, next_item = self.map.pop(key)
+ prev_item[2] = next_item
+ next_item[1] = prev_item
def __iter__(self):
end = self.end
@@ -514,7 +514,8 @@ class OrderedSet(collections.MutableSet):
yield curr[0]
curr = curr[1]
- def pop(self, last=True):
+ # The second argument is an addition that causes a pylint warning.
+ def pop(self, last=True): # pylint: disable=W0221
if not self:
raise KeyError('set is empty')
key = self.end[1][0] if last else self.end[2][0]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698