Skip to content

Commit 7056418

Browse files
committed
flake8 inline comment spacing; too many leading #
E261 at least two spaces before inline comment E266 too many leading '#' for block comment
1 parent 3db7476 commit 7056418

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

roundup/cgi/templating.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
try:
4949
from StructuredText.StructuredText import HTML as StructuredText
5050
except ImportError:
51-
try: # older version
51+
try: # older version
5252
import StructuredText
5353
except ImportError:
5454
StructuredText = None
@@ -228,7 +228,7 @@ def anti_csrf_nonce(client, lifetime=None):
228228
otks.commit()
229229
return key
230230

231-
### templating
231+
# templating
232232

233233

234234
class NoTemplate(RoundupException):
@@ -295,7 +295,7 @@ def _find(self, name):
295295
src = os.path.join(realsrc, f)
296296
realpath = os.path.realpath(src)
297297
if not realpath.startswith(realsrc):
298-
return # will raise invalid template
298+
return # will raise invalid template
299299
if os.path.exists(src):
300300
return (src, f)
301301

@@ -1743,7 +1743,7 @@ def _hyper_repl_markdown(self, match):
17431743
if end < len(match.string):
17441744
suffix = match.string[end]
17451745
if (prefix, suffix) in {('[', ']')}:
1746-
if match.string[end+1] == '(': # find following (
1746+
if match.string[end+1] == '(': # find following (
17471747
return match.group(0)
17481748
if (prefix, suffix) in {('(',')')}:
17491749
if match.string[start-1] == ']':
@@ -2130,8 +2130,8 @@ def field(self, labelfirst=False, y_label=None, n_label=None,
21302130
checked="checked", id="%s_%s"%(self._formname, 'no'), **kwargs)
21312131

21322132
if (u_label):
2133-
if (u_label is True): # it was set via u_label=True
2134-
u_label = '' # make it empty but a string not boolean
2133+
if (u_label is True): # it was set via u_label=True
2134+
u_label = '' # make it empty but a string not boolean
21352135
u_rb = self.input(type="radio", name=self._formname, value="",
21362136
id="%s_%s"%(self._formname, 'unk'), **kwargs)
21372137
else:
@@ -2711,7 +2711,7 @@ def keyfunc(v):
27112711
else:
27122712
val = prop._value
27132713

2714-
if val is None: # verify orderprop is set to a value
2714+
if val is None: # verify orderprop is set to a value
27152715
return (NoneCode, None)
27162716
return (1, val) # val should be base python type
27172717

@@ -3035,7 +3035,7 @@ def _parse_sort(self, var, name):
30353035
fields = handleListCGIValue(self.form[key])
30363036
if dirkey in self.form:
30373037
dirs.append(self.form.getfirst(dirkey))
3038-
if fields: # only try other special char if nothing found
3038+
if fields: # only try other special char if nothing found
30393039
break
30403040

30413041
# sometimes requests come in without a class
@@ -3555,8 +3555,8 @@ def html_calendar(self, request):
35553555
# if user submits a value like "d4" and gets an edit error.
35563556
# If either or both invalid just ignore that we can't parse it
35573557
# and assign them to today.
3558-
curr_date = date.Date(date_str) # to highlight
3559-
display = date.Date(display) # to show
3558+
curr_date = date.Date(date_str) # to highlight
3559+
display = date.Date(display) # to show
35603560
except ValueError:
35613561
# we couldn't parse the date
35623562
# just let the calendar display

0 commit comments

Comments
 (0)