flake 8
This commit is contained in:
parent
3173384d68
commit
dadfdaee12
1 changed files with 7 additions and 1 deletions
|
@ -34,6 +34,7 @@ else:
|
|||
|
||||
# Code from six egg https://bitbucket.org/gutworth/six/src/a3641cb211cc360848f1e2dd92e9ae6cd1de55dd/six.py?at=default
|
||||
|
||||
|
||||
def add_metaclass(metaclass):
|
||||
"""Class decorator for creating a class with a metaclass."""
|
||||
def wrapper(cls):
|
||||
|
@ -48,8 +49,13 @@ def add_metaclass(metaclass):
|
|||
|
||||
@python_2_unicode_compatible
|
||||
class MSFList(list):
|
||||
|
||||
def __init__(self, choices, *args, **kwargs):
|
||||
self.choices = choices
|
||||
super(MSFList, self).__init__(*args, **kwargs)
|
||||
|
||||
def __str__(msgl):
|
||||
l = [choices.get(int(i)) if i.isdigit() else choices.get(i) for i in msgl]
|
||||
l = [msgl.choices.get(int(i)) if i.isdigit() else msgl.choices.get(i) for i in msgl]
|
||||
return u', '.join([string_type(s) for s in l])
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue