Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 7031:0c99d1d0254a
flake8 fix 2: E303 too many blank lines
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 09 Oct 2022 18:06:16 -0400 |
| parents | bb3845cf6b8e |
| children | f529cca242dc |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Sun Oct 09 17:58:53 2022 -0400 +++ b/roundup/cgi/templating.py Sun Oct 09 18:06:16 2022 -0400 @@ -70,7 +70,9 @@ class Markdown(markdown2.Markdown): # don't allow disabled protocols in links - _safe_protocols = re.compile('(?!' + ':|'.join([re.escape(s) for s in _disable_url_schemes]) + ':)', re.IGNORECASE) + _safe_protocols = re.compile('(?!' + ':|'.join([ + re.escape(s) for s in _disable_url_schemes]) + + ':)', re.IGNORECASE) def _extras(config): extras = {'fenced-code-blocks': {}, 'nofollow': None} @@ -939,10 +941,12 @@ group, sort, pagesize, filter) onclick = "javascript:help_window('%s', '%s', '%s');return false;" % \ (help_url, width, height) - return '<a class="classhelp" data-helpurl="%s" data-width="%s" data-height="%s" href="%s" onclick="%s" %s>%s</a>' % \ - (help_url, width, height, - help_url, onclick, self.cgi_escape_attrs(**html_kwargs), - self._(label)) + return ('<a class="classhelp" data-helpurl="%s" ' + 'data-width="%s" data-height="%s" href="%s" ' + 'onclick="%s" %s>%s</a>') % ( + help_url, width, height, + help_url, onclick, self.cgi_escape_attrs(**html_kwargs), + self._(label)) def submit(self, label=''"Submit New Entry", action="new", html_kwargs={}): """ Generate a submit button (and action hidden element) @@ -2334,7 +2338,8 @@ date = "" data_attr = { - "data-calurl": '%s?@template=calendar&property=%s&form=%s%s' % (self._classname, self._name, form, date), + "data-calurl": '%s?@template=calendar&property=%s&form=%s%s' % ( + self._classname, self._name, form, date), "data-width": width, "data-height": height }
