mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +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.'
|
'This is a bug.'
|
||||||
self.__parent = super(OnlySomeStrings, self)
|
self.__parent = super(OnlySomeStrings, self)
|
||||||
self.__parent.__init__(*args, **kwargs)
|
self.__parent.__init__(*args, **kwargs)
|
||||||
|
self.__doc__ = 'Valid values include %s.' % \
|
||||||
|
utils.commaAndify(map(repr, self.validStrings))
|
||||||
|
|
||||||
def help(self):
|
def help(self):
|
||||||
strings = [s for s in self.validStrings if s]
|
strings = [s for s in self.validStrings if s]
|
||||||
return '%s Valid strings: %s.' % \
|
return '%s Valid strings: %s.' % \
|
||||||
(self._help, utils.commaAndify(strings))
|
(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):
|
def normalize(self, s):
|
||||||
lowered = s.lower()
|
lowered = s.lower()
|
||||||
L = list(map(str.lower, self.validStrings))
|
L = list(map(str.lower, self.validStrings))
|
||||||
|
Loading…
Reference in New Issue
Block a user