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

Unified Diff: sitescripts/subscriptions/subscriptionParser.py

Issue 29670635: Issue 5844 - Remove redundant parentheses in abpssembly (Closed) Base URL: https://hg.adblockplus.org/abpssembly/
Patch Set: Created Jan. 16, 2018, 5:58 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/knownIssuesParser.py ('k') | sitescripts/subscriptions/web/fallback.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/subscriptions/subscriptionParser.py
===================================================================
--- a/sitescripts/subscriptions/subscriptionParser.py
+++ b/sitescripts/subscriptions/subscriptionParser.py
@@ -152,13 +152,13 @@
keywords[keyword] = True
else:
warn('Unknown keyword %s given for attribute %s in %s' % (keyword, key, path))
- (name, url) = (self.name, value)
+ name, url = (self.name, value)
if key == 'variant':
match = re.search(r'(.+?)\s+(\S+)$', value)
if match:
- (name, url) = (match.group(1), match.group(2))
+ name, url = (match.group(1), match.group(2))
else:
- warn('Invalid variant format in %s, no name given?' % (path))
+ warn('Invalid variant format in %s, no name given?' % path)
if not _validate_URL(url):
warn('Invalid list URL %s given in %s' % (url, path))
self.variants.append([name, url, keywords['complete']])
@@ -199,21 +199,21 @@
warn('None of the attributes %s present in %s' % (str, path))
if len(self.variants) == 0:
- warn('No list locations given in %s' % (path))
+ warn('No list locations given in %s' % path)
if self.type not in ('ads', 'anti-adblock', 'other', 'malware', 'social', 'privacy'):
- warn('Unknown type given in %s' % (path))
+ warn('Unknown type given in %s' % path)
if self.digest != 'daily' and self.digest != 'weekly':
- warn('Unknown digest frequency given in %s' % (path))
+ warn('Unknown digest frequency given in %s' % path)
if not self.digestDay[0:3].lower() in weekdays:
- warn('Unknown digest day given in %s' % (path))
+ warn('Unknown digest day given in %s' % path)
self.digestDay = 'wed'
self.digestDay = weekdays[self.digestDay[0:3].lower()]
if self.recommendation is not None and self.type == 'ads' and not (self.languages and self.languages.strip()):
- warn('Recommendation without languages in %s' % (path))
+ warn('Recommendation without languages in %s' % path)
if len(self.supplements) == 0:
for [name, url, complete] in self.variants:
if complete:
- warn('Variant marked as complete for non-supplemental subscription in %s' % (path))
+ warn('Variant marked as complete for non-supplemental subscription in %s' % path)
break
self.variants.sort(key=lambda variant: (self.recommendation == variant) * 2 + variant[2], reverse=True)
@@ -255,7 +255,7 @@
continue
if filedata.name in result:
- warn('Name %s is claimed by multiple files' % (filedata.name))
+ warn('Name %s is claimed by multiple files' % filedata.name)
result[filedata.name] = filedata
calculate_supplemented(result)
« no previous file with comments | « sitescripts/subscriptions/knownIssuesParser.py ('k') | sitescripts/subscriptions/web/fallback.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld