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

Unified Diff: appengine/findit/libs/gitiles/blame.py

Issue 2590313002: Added Blame.AddReagions(iterable) method (Closed)
Patch Set: changing Blame.AddRegions to use list.extend Created 4 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 | « appengine/findit/crash/test/suspect_test.py ('k') | appengine/findit/libs/gitiles/test/blame_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/libs/gitiles/blame.py
diff --git a/appengine/findit/libs/gitiles/blame.py b/appengine/findit/libs/gitiles/blame.py
index a44aa88107a9ed77f880dc32d60843018dbd54e7..138edf16e77ce4d3f19c5ba666dbd9388f0208a5 100644
--- a/appengine/findit/libs/gitiles/blame.py
+++ b/appengine/findit/libs/gitiles/blame.py
@@ -33,8 +33,21 @@ class Blame(list):
self.path = path
def AddRegion(self, region):
+ """Add a single region to this object.
+
+ Args:
+ region (Region): the region to add
+ """
self.append(region)
+ def AddRegions(self, regions):
+ """Add multiple regions to this object.
+
+ Args:
+ regions (iterable of Region): the regions to add.
+ """
+ self.extend(regions)
+
def ToDict(self):
regions = []
for region in self:
« no previous file with comments | « appengine/findit/crash/test/suspect_test.py ('k') | appengine/findit/libs/gitiles/test/blame_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698