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

Unified Diff: cms/converters.py

Issue 29711681: Noissue - Remove Redundant Parentheses (Closed) Base URL: https://hg.adblockplus.org/cms
Patch Set: Created Feb. 28, 2018, 11:52 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cms/converters.py
===================================================================
--- a/cms/converters.py
+++ b/cms/converters.py
@@ -176,17 +176,18 @@
# Insert fixed strings
for i, fixed_string in enumerate(fixed_strings, 1):
result = result.replace('{{{}}}'.format(i), fixed_string)
# Insert attributes
result = escape(result)
- def stringify_attribute((name, value)):
+ def stringify_attribute(attribute):
Jon Sonesen 2018/03/01 00:00:15 alternatively, you can expand tuples when passed e
+ name, value = attribute
return '{}="{}"'.format(
escape(name),
escape(self.insert_localized_strings(value, {}))
)
for tag in self.whitelist:
allowed_contents = '(?:[^<>]|{})'.format('|'.join(
'<(?:{}[^<>]*?|/{})>'.format(t, t)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld