@@ -584,9 +584,9 @@ def html4_cgi_escape_attrs(**attrs):
584584 value is None
585585 Code can use None to indicate a pure boolean.
586586 '''
587- return ' ' .join (['%s="%s"' % (k ,html_escape (str (v ), True ))
587+ return ' ' .join (['%s="%s"' % (k , html_escape (str (v ), True ))
588588 if v is not None else '%s' % (k )
589- for k ,v in sorted (attrs .items ())])
589+ for k , v in sorted (attrs .items ())])
590590
591591
592592def xhtml_cgi_escape_attrs (** attrs ):
@@ -598,9 +598,9 @@ def xhtml_cgi_escape_attrs(**attrs):
598598 value is None
599599 Code can use None to indicate a pure boolean.
600600 '''
601- return ' ' .join (['%s="%s"' % (k ,html_escape (str (v ), True ))
602- if v is not None else '%s="%s"' % (k ,k )
603- for k ,v in sorted (attrs .items ())])
601+ return ' ' .join (['%s="%s"' % (k , html_escape (str (v ), True ))
602+ if v is not None else '%s="%s"' % (k , k )
603+ for k , v in sorted (attrs .items ())])
604604
605605
606606def input_html4 (** attrs ):
@@ -785,7 +785,7 @@ def properties(self, sort=1, cansearch=True):
785785 l .append (htmlklass (self ._client , self ._classname , '' ,
786786 prop , name , value , self ._anonymous ))
787787 if sort :
788- l .sort (key = lambda a :a ._name )
788+ l .sort (key = lambda a : a ._name )
789789 return l
790790
791791 def list (self , sort_on = None ):
@@ -1160,7 +1160,7 @@ def history(self, direction='descending', dre=re.compile(r'^\d+$'),
11601160 current = {}
11611161 comments = {}
11621162 for id , evt_date , user , action , args in history :
1163- date_s = str (evt_date .local (timezone )).replace ("." ," " )
1163+ date_s = str (evt_date .local (timezone )).replace ("." , " " )
11641164 arg_s = ''
11651165 if action in ['link' , 'unlink' ] and isinstance (args , tuple ):
11661166 if len (args ) == 3 :
@@ -1706,7 +1706,7 @@ def _hyper_repl_rst(self, match):
17061706 s = match .group ('email' )
17071707 return '`%s <mailto:%s>`_' % (s , s )
17081708 elif len (match .group ('id' )) < 10 :
1709- return self ._hyper_repl_item (match ,'`%(item)s <%(cls)s%(id)s>`_' )
1709+ return self ._hyper_repl_item (match , '`%(item)s <%(cls)s%(id)s>`_' )
17101710 else :
17111711 # just return the matched text
17121712 return match .group (0 )
@@ -1744,10 +1744,10 @@ def _hyper_repl_markdown(self, match):
17441744 if (prefix , suffix ) in {('[' , ']' )}:
17451745 if match .string [end + 1 ] == '(' : # find following (
17461746 return match .group (0 )
1747- if (prefix , suffix ) in {('(' ,')' )}:
1747+ if (prefix , suffix ) in {('(' , ')' )}:
17481748 if match .string [start - 1 ] == ']' :
17491749 return match .group (0 )
1750- return self ._hyper_repl_item (match ,'[%(item)s](%(cls)s%(id)s)' )
1750+ return self ._hyper_repl_item (match , '[%(item)s](%(cls)s%(id)s)' )
17511751 else :
17521752 # just return the matched text
17531753 return match .group (0 )
@@ -1822,7 +1822,7 @@ def stext(self, escape=0, hyperlink=1):
18221822 s = self .plain (escape = escape , hyperlink = hyperlink )
18231823 if not StructuredText :
18241824 return s
1825- return StructuredText (s ,level = 1 ,header = 0 )
1825+ return StructuredText (s , level = 1 , header = 0 )
18261826
18271827 def rst (self , hyperlink = 1 ):
18281828 """ Render the value of the property as ReStructuredText.
@@ -2341,8 +2341,9 @@ def popcal(self, width=300, height=200, label="(cal)",
23412341
23422342 return ('<a class="classhelp" %s href="javascript:help_window('
23432343 "'%s?@template=calendar&property=%s&form=%s%s', %d, %d)"
2344- '">%s</a>' % (self .cgi_escape_attrs (** data_attr ),self ._classname , self ._name , form , date , width ,
2345- height , label ))
2344+ '">%s</a>' % (self .cgi_escape_attrs (** data_attr ),
2345+ self ._classname , self ._name , form , date , width ,
2346+ height , label ))
23462347
23472348
23482349class IntervalHTMLProperty (HTMLProperty ):
@@ -2678,7 +2679,7 @@ def sorted(self, property, reverse=False, NoneFirst=False):
26782679 # use 2 if NoneFirst is False to sort None last
26792680 # 0 to sort to sort None first
26802681 # 1 is used to sort the integer values.
2681- NoneCode = (2 ,0 )[NoneFirst ]
2682+ NoneCode = (2 , 0 )[NoneFirst ]
26822683
26832684 value = list (self .__iter__ ())
26842685
@@ -2909,7 +2910,7 @@ def menu(self, size=None, height=None, showid=0, additional=[],
29092910
29102911
29112912def register_propclass (prop , cls ):
2912- for index ,propclass in enumerate (propclasses ):
2913+ for index , propclass in enumerate (propclasses ):
29132914 p , c = propclass
29142915 if prop == p :
29152916 propclasses [index ] = (prop , cls )
@@ -3190,10 +3191,10 @@ def __str__(self):
31903191 d .update (self .__dict__ )
31913192 f = ''
31923193 for k in self .form .keys ():
3193- f += '\n %r=%r' % (k ,handleListCGIValue (self .form [k ]))
3194+ f += '\n %r=%r' % (k , handleListCGIValue (self .form [k ]))
31943195 d ['form' ] = f
31953196 e = ''
3196- for k ,v in self .env .items ():
3197+ for k , v in self .env .items ():
31973198 e += '\n %r=%r' % (k , v )
31983199 d ['env' ] = e
31993200 return """
@@ -3248,7 +3249,7 @@ def add(k, v):
32483249 add (sc + 'filter' , ',' .join (self .filter ))
32493250 if self .classname and filterspec :
32503251 cls = self .client .db .getclass (self .classname )
3251- for k ,v in self .filterspec .items ():
3252+ for k , v in self .filterspec .items ():
32523253 if k in exclude :
32533254 continue
32543255 if isinstance (v , list ):
@@ -3282,8 +3283,8 @@ def indexargs_url(self, url, args):
32823283 """
32833284 q = urllib_ .quote
32843285 sc = self .special_char
3285- l = ['%s=%s' % (k ,is_us (v ) and q (v ) or v )
3286- for k ,v in args .items () if v is not None ]
3286+ l = ['%s=%s' % (k , is_us (v ) and q (v ) or v )
3287+ for k , v in args .items () if v is not None ]
32873288 # pull out the special values (prefixed by @ or :)
32883289 specials = {}
32893290 for key in args .keys ():
@@ -3321,7 +3322,7 @@ def indexargs_url(self, url, args):
33213322 # finally, the remainder of the filter args in the request
33223323 if self .classname and self .filterspec :
33233324 cls = self .client .db .getclass (self .classname )
3324- for k ,v in self .filterspec .items ():
3325+ for k , v in self .filterspec .items ():
33253326 if k not in args :
33263327 if isinstance (v , list ):
33273328 prop = cls .get_transitive_prop (k )
@@ -3352,7 +3353,7 @@ def base_javascript(self):
33523353 HelpWin.focus ()
33533354}
33543355</script>
3355- """ % (self ._client .client_nonce ,self .base )
3356+ """ % (self ._client .client_nonce , self .base )
33563357
33573358 def batch (self , permission = 'View' ):
33583359 """ Return a batch object for results from the "current search"
0 commit comments