from .repo import Repo
def escape_html(s):
- s = s.replace("&", "&");
- s = s.replace("<", "<");
- s = s.replace(">", ">");
- s = s.replace("'", "'");
- s = s.replace('"', """);
+ s = s.replace("&", "&")
+ s = s.replace("<", "<")
+ s = s.replace(">", ">")
+ s = s.replace("'", "'")
+ s = s.replace('"', """)
return s
def escape_html_newline(s):
- s = s.replace('\n', "<br/>");
+ s = s.replace('\n', "<br/>")
return s
def diff_to_json(old_url, new_url, **kwargs):
'gitweb': data['gitweb']
}
if style == 'repo':
- return output_html('diff.csv', **context) # pylint: disable=W0142
+ return output_html('diff.csv', **context)
elif style == 'image':
- return output_html('image_diff.csv', **context) # pylint: disable=W0142
+ return output_html('image_diff.csv', **context)
def diff_to_html(old_url, new_url, **kwargs):
"""Output diffs' html format.
'gitweb': data['gitweb']
}
if style == 'repo':
- return output_html('diff.html', **context) # pylint: disable=W0142
+ return output_html('diff.html', **context)
elif style == 'image':
- return output_html('image_diff.html', **context) # pylint: disable=W0142
+ return output_html('image_diff.html', **context)
def diff_to_dist(old_url, new_url, dist_path, **kwargs):
"""Create a dist-dir of diffs, contains html and css.
def xml2obj(src):
- # pylint: disable=C0301, C0111, R0903, R0912, W0212, C0103, W0231
+ # pylint: disable=C0301, C0111, R0903, R0912, C0103
"""
A simple function to converts XML data into native Python object,
from http://goo.gl/Ymc6Nl, Licensed under the PSF License.