Easy spacing fixes, trailing stuff
Remove useless trailing \ Remove trailing spaces Add missing empty lines autopep8 -ir -j2 --select=E301,E302,E502,W291,W293,W391 . Diff quickly checked.
This commit is contained in:
parent
c21d1f7925
commit
7094931c92
231 changed files with 474 additions and 67 deletions
|
|
@ -37,6 +37,7 @@ class ValuesDict(OrderedDict):
|
|||
for v in values:
|
||||
self[v.id] = v
|
||||
|
||||
|
||||
class Value(object):
|
||||
"""
|
||||
Value.
|
||||
|
|
@ -116,6 +117,7 @@ class Value(object):
|
|||
"""
|
||||
return self._value
|
||||
|
||||
|
||||
class ValueBackendPassword(Value):
|
||||
_domain = None
|
||||
_callbacks = {}
|
||||
|
|
@ -190,6 +192,7 @@ class ValueBackendPassword(Value):
|
|||
self._stored = False
|
||||
return self._value
|
||||
|
||||
|
||||
class ValueInt(Value):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['regexp'] = '^\d+$'
|
||||
|
|
@ -198,6 +201,7 @@ class ValueInt(Value):
|
|||
def get(self):
|
||||
return int(self._value)
|
||||
|
||||
|
||||
class ValueFloat(Value):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['regexp'] = '^[\d\.]+$'
|
||||
|
|
@ -212,6 +216,7 @@ class ValueFloat(Value):
|
|||
def get(self):
|
||||
return float(self._value)
|
||||
|
||||
|
||||
class ValueBool(Value):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['choices'] = {'y': 'True', 'n': 'False'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue