mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
80: Cleaned up docstring for option.normalize()
This commit is contained in:
parent
b3fc5f9a41
commit
f656e31a7e
@ -52,14 +52,17 @@ class option(object):
|
|||||||
))
|
))
|
||||||
__rules = None
|
__rules = None
|
||||||
|
|
||||||
|
# type = unicode, int, float # Set in subclass
|
||||||
|
|
||||||
def normalize(self, value):
|
def normalize(self, value):
|
||||||
"""
|
"""
|
||||||
Normalize an input value. The base class implementation only does
|
Returns the normalized form of `value`. If `value` cannot be
|
||||||
type coercion, but subclasses might do other normalization (e.g., a
|
normalized, NormalizationError is raised, which is a subclass of
|
||||||
str option might strip leading and trailing white-space).
|
ValidationError.
|
||||||
|
|
||||||
If value cannot be normalized, NormalizationError is raised, which
|
The base class implementation only does type coercion, but subclasses
|
||||||
is a subclass of ValidationError.
|
might do other normalization (e.g., a unicode option might strip
|
||||||
|
leading and trailing white-space).
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return self.type(value)
|
return self.type(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user