mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
*** empty log message ***
This commit is contained in:
parent
b4817ec5d8
commit
6061f49a48
@ -457,17 +457,14 @@ class OnlySomeStrings(String):
|
||||
'This is a bug.'
|
||||
self.__parent = super(OnlySomeStrings, self)
|
||||
self.__parent.__init__(*args, **kwargs)
|
||||
self.__doc__ = 'Valid values include %s.' % \
|
||||
utils.commaAndify(map(repr, self.validStrings))
|
||||
|
||||
def help(self):
|
||||
strings = [s for s in self.validStrings if s]
|
||||
return '%s Valid strings: %s.' % \
|
||||
(self._help, utils.commaAndify(strings))
|
||||
|
||||
def error(self):
|
||||
self.__parent.error('That is not a valid value. '
|
||||
'Valid values include %s.' % \
|
||||
utils.commaAndify(map(repr, self.validStrings)))
|
||||
|
||||
def normalize(self, s):
|
||||
lowered = s.lower()
|
||||
L = list(map(str.lower, self.validStrings))
|
||||
|
Loading…
Reference in New Issue
Block a user