[extensions-web] review: Remove nesting from function
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] review: Remove nesting from function
- Date: Sat, 14 Jul 2012 12:00:00 +0000 (UTC)
commit cd185cf23598eec4c01c0b763032524d0f39a6d4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Jul 14 07:59:21 2012 -0400
review: Remove nesting from function
sweettooth/review/diffutils.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/sweettooth/review/diffutils.py b/sweettooth/review/diffutils.py
index a2cf21f..a350e0d 100644
--- a/sweettooth/review/diffutils.py
+++ b/sweettooth/review/diffutils.py
@@ -720,20 +720,20 @@ def get_linenum(idx):
else:
return None
-def get_chunks(a, b):
- def diff_line(old, new):
- oldindex, oldline = old
- newindex, newline = new
+def diff_line(old, new):
+ oldindex, oldline = old
+ newindex, newline = new
- oldregion, newregion = get_line_changed_regions(oldline, newline)
- oldlinenum, newlinenum = get_linenum(oldindex), get_linenum(newindex)
+ oldregion, newregion = get_line_changed_regions(oldline, newline)
+ oldlinenum, newlinenum = get_linenum(oldindex), get_linenum(newindex)
- result = dict(oldlinenum=oldlinenum, newlinenum=newlinenum,
- oldindex=oldindex, newindex=newindex,
- oldregion=oldregion, newregion=newregion)
+ result = dict(oldlinenum=oldlinenum, newlinenum=newlinenum,
+ oldindex=oldindex, newindex=newindex,
+ oldregion=oldregion, newregion=newregion)
- return result
+ return result
+def get_chunks(a, b):
if a == b:
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]