lib/of_config: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
3f46c5a2ff
commit
853bdeb1c3
@ -60,7 +60,7 @@ class _Base(stringify.StringifyMixin):
|
|||||||
k = _pythonify(e.name)
|
k = _pythonify(e.name)
|
||||||
try:
|
try:
|
||||||
v = kwargs.pop(k)
|
v = kwargs.pop(k)
|
||||||
assert not e.name in kwargs
|
assert e.name not in kwargs
|
||||||
except KeyError:
|
except KeyError:
|
||||||
k = e.name
|
k = e.name
|
||||||
try:
|
try:
|
||||||
@ -111,7 +111,7 @@ class _Base(stringify.StringifyMixin):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def from_et(cls, et):
|
def from_et(cls, et):
|
||||||
def convert(v):
|
def convert(v):
|
||||||
if not e.cls is None:
|
if e.cls is not None:
|
||||||
return e.cls.from_et(v)
|
return e.cls.from_et(v)
|
||||||
return v
|
return v
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ class _Base(stringify.StringifyMixin):
|
|||||||
assert e.is_list
|
assert e.is_list
|
||||||
v = map(convert, v)
|
v = map(convert, v)
|
||||||
k = _pythonify(e.name)
|
k = _pythonify(e.name)
|
||||||
assert not k in kwargs
|
assert k not in kwargs
|
||||||
kwargs[k] = v
|
kwargs[k] = v
|
||||||
return cls(**kwargs)
|
return cls(**kwargs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user