pylint fixes

This commit is contained in:
Chris Jones 2009-10-09 00:30:03 +01:00
parent 7605957efa
commit c1c81d3a91
2 changed files with 89 additions and 88 deletions

View File

@ -47,11 +47,11 @@ class TerminatorEncoding:
[False, "ISO-8859-14", _("Celtic") ],
[False, "ISO-8859-15", _("Western") ],
[False, "ISO-8859-16", _("Romanian") ],
# [False, "UTF-7", _("Unicode") ],
# [False, "UTF-7", _("Unicode") ],
[False, "UTF-8", _("Unicode") ],
# [False, "UTF-16", _("Unicode") ],
# [False, "UCS-2", _("Unicode") ],
# [False, "UCS-4", _("Unicode") ],
# [False, "UTF-16", _("Unicode") ],
# [False, "UCS-2", _("Unicode") ],
# [False, "UCS-4", _("Unicode") ],
[False, "ARMSCII-8", _("Armenian") ],
[False, "BIG5", _("Chinese Traditional") ],
[False, "BIG5-HKSCS", _("Chinese Traditional") ],
@ -73,7 +73,7 @@ class TerminatorEncoding:
[False, "ISO-2022-JP", _("Japanese") ],
[False, "ISO-2022-KR", _("Korean") ],
[False, "ISO-IR-111", _("Cyrillic") ],
# [False, "JOHAB", _("Korean") ],
# [False, "JOHAB", _("Korean") ],
[False, "KOI8-R", _("Cyrillic") ],
[False, "KOI8-U", _("Cyrillic/Ukrainian") ],
[False, "MAC_ARABIC", _("Arabic") ],
@ -113,5 +113,6 @@ class TerminatorEncoding:
def get_list():
"""Return a list of supported encodings"""
return TerminatorEncoding.encodings
get_list = staticmethod(get_list)

View File

@ -76,9 +76,9 @@ class Terminator(Borg):
def do_enumerate(self, widget, pad):
"""Insert the number of each terminal in a group, into that terminal"""
if pad:
numstr='%0'+str(len(str(len(self.terminals))))+'d'
numstr = '%0'+str(len(str(len(self.terminals))))+'d'
else:
numstr='%d'
numstr = '%d'
for term in self.get_target_terms(widget):
idx = self.terminals.index(term)
@ -89,12 +89,12 @@ class Terminator(Borg):
if self.groupsend == self.groupsend_type['all']:
return(self.terminals)
elif self.groupsend == self.groupsend_type['group']:
set = []
termset = []
for term in self.terminals:
if term == widget or (term.group != None and term.group ==
widget.group):
set.append(term)
return(set)
termset.append(term)
return(termset)
else:
return([widget])