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

Unified Diff: sitescripts/notifications/parser.py

Issue 29670611: Issue 5844 - Remove redundant parentheses in sitescripts and abpsembly (Closed) Base URL: https://hg.adblockplus.org/sitescripts/
Patch Set: Addressed the comments in /sitescripts Created Jan. 25, 2018, 4:12 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/formmail/web/formmail2.py ('k') | sitescripts/reports/bin/mailDigests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/notifications/parser.py
===================================================================
--- a/sitescripts/notifications/parser.py
+++ b/sitescripts/notifications/parser.py
@@ -30,20 +30,20 @@
items = [
(r'^(extension|application|platform)(=)(.+)$', {
- '=': (lambda k, v: {k: v}),
+ '=': lambda k, v: {k: v},
}),
(r'^(extension|application|platform)Version(=|\>=|\<=)(.+)$', {
- '>=': (lambda k, v: {k + 'MinVersion': v}),
- '<=': (lambda k, v: {k + 'MaxVersion': v}),
- '=': (lambda k, v: {k + 'MinVersion': v, k + 'MaxVersion': v}),
+ '>=': lambda k, v: {k + 'MinVersion': v},
+ '<=': lambda k, v: {k + 'MaxVersion': v},
+ '=': lambda k, v: {k + 'MinVersion': v, k + 'MaxVersion': v},
}),
(r'^(blockedTotal)(=|\>=|\<=)(\d+)$', {
- '>=': (lambda k, v: {k + 'Min': int(v)}),
- '<=': (lambda k, v: {k + 'Max': int(v)}),
- '=': (lambda k, v: {k + 'Min': int(v), k + 'Max': int(v)}),
+ '>=': lambda k, v: {k + 'Min': int(v)},
+ '<=': lambda k, v: {k + 'Max': int(v)},
+ '=': lambda k, v: {k + 'Min': int(v), k + 'Max': int(v)},
}),
(r'^(locales)(=)([\w\-,]+)$', {
- '=': (lambda k, v: {k: v.split(',')}),
+ '=': lambda k, v: {k: v.split(',')},
}),
]
« no previous file with comments | « sitescripts/formmail/web/formmail2.py ('k') | sitescripts/reports/bin/mailDigests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld