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: Created Jan. 16, 2018, 5:28 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
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(',')},
}),
]

Powered by Google App Engine
This is Rietveld