|
48 | 48 | try: |
49 | 49 | from StructuredText.StructuredText import HTML as StructuredText |
50 | 50 | except ImportError: |
51 | | - try: # older version |
| 51 | + try: # older version |
52 | 52 | import StructuredText |
53 | 53 | except ImportError: |
54 | 54 | StructuredText = None |
@@ -228,7 +228,7 @@ def anti_csrf_nonce(client, lifetime=None): |
228 | 228 | otks.commit() |
229 | 229 | return key |
230 | 230 |
|
231 | | -### templating |
| 231 | +# templating |
232 | 232 |
|
233 | 233 |
|
234 | 234 | class NoTemplate(RoundupException): |
@@ -295,7 +295,7 @@ def _find(self, name): |
295 | 295 | src = os.path.join(realsrc, f) |
296 | 296 | realpath = os.path.realpath(src) |
297 | 297 | if not realpath.startswith(realsrc): |
298 | | - return # will raise invalid template |
| 298 | + return # will raise invalid template |
299 | 299 | if os.path.exists(src): |
300 | 300 | return (src, f) |
301 | 301 |
|
@@ -1743,7 +1743,7 @@ def _hyper_repl_markdown(self, match): |
1743 | 1743 | if end < len(match.string): |
1744 | 1744 | suffix = match.string[end] |
1745 | 1745 | if (prefix, suffix) in {('[', ']')}: |
1746 | | - if match.string[end+1] == '(': # find following ( |
| 1746 | + if match.string[end+1] == '(': # find following ( |
1747 | 1747 | return match.group(0) |
1748 | 1748 | if (prefix, suffix) in {('(',')')}: |
1749 | 1749 | if match.string[start-1] == ']': |
@@ -2130,8 +2130,8 @@ def field(self, labelfirst=False, y_label=None, n_label=None, |
2130 | 2130 | checked="checked", id="%s_%s"%(self._formname, 'no'), **kwargs) |
2131 | 2131 |
|
2132 | 2132 | 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 |
2135 | 2135 | u_rb = self.input(type="radio", name=self._formname, value="", |
2136 | 2136 | id="%s_%s"%(self._formname, 'unk'), **kwargs) |
2137 | 2137 | else: |
@@ -2711,7 +2711,7 @@ def keyfunc(v): |
2711 | 2711 | else: |
2712 | 2712 | val = prop._value |
2713 | 2713 |
|
2714 | | - if val is None: # verify orderprop is set to a value |
| 2714 | + if val is None: # verify orderprop is set to a value |
2715 | 2715 | return (NoneCode, None) |
2716 | 2716 | return (1, val) # val should be base python type |
2717 | 2717 |
|
@@ -3035,7 +3035,7 @@ def _parse_sort(self, var, name): |
3035 | 3035 | fields = handleListCGIValue(self.form[key]) |
3036 | 3036 | if dirkey in self.form: |
3037 | 3037 | 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 |
3039 | 3039 | break |
3040 | 3040 |
|
3041 | 3041 | # sometimes requests come in without a class |
@@ -3555,8 +3555,8 @@ def html_calendar(self, request): |
3555 | 3555 | # if user submits a value like "d4" and gets an edit error. |
3556 | 3556 | # If either or both invalid just ignore that we can't parse it |
3557 | 3557 | # 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 |
3560 | 3560 | except ValueError: |
3561 | 3561 | # we couldn't parse the date |
3562 | 3562 | # just let the calendar display |
|
0 commit comments