Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/templateFilters.py

Issue 29670611: Issue 5844 - Remove redundant parentheses in sitescripts and abpsembly (Closed) Base URL: https://hg.adblockplus.org/sitescripts/
Patch Set: Fixed one more case of redundant parentheses Created Jan. 25, 2018, 7:03 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sitescripts/subscriptions/web/fallback.py ('k') | sitescripts/urlfixer/web/submitData.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/templateFilters.py
===================================================================
--- a/sitescripts/templateFilters.py
+++ b/sitescripts/templateFilters.py
@@ -123,19 +123,21 @@
def subscriptionSort(value, prioritizeRecommended=True):
value = value[:] # create a copy of the list
if prioritizeRecommended:
- value.sort(lambda a, b: (
- cmp(a.type, b.type) or
- cmp(a.deprecated, b.deprecated) or
- cmp(b.catchall, a.catchall) or
- cmp(b.recommendation != None, a.recommendation != None) or
- cmp(a.name.lower(), b.name.lower())
- ))
+ value.sort(
+ lambda a, b:
+ cmp(a.type, b.type) or
+ cmp(a.deprecated, b.deprecated) or
+ cmp(b.catchall, a.catchall) or
+ cmp(b.recommendation != None, a.recommendation != None) or
+ cmp(a.name.lower(), b.name.lower())
+ )
else:
- value.sort(lambda a, b: (
- cmp(a.type, b.type) or
- cmp(a.deprecated, b.deprecated) or
- cmp(a.name.lower(), b.name.lower())
- ))
+ value.sort(
+ lambda a, b:
+ cmp(a.type, b.type) or
+ cmp(a.deprecated, b.deprecated) or
+ cmp(a.name.lower(), b.name.lower())
+ )
return value
« no previous file with comments | « sitescripts/subscriptions/web/fallback.py ('k') | sitescripts/urlfixer/web/submitData.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld