提交 09bf5544 authored 作者: Mohammad Pezeshki's avatar Mohammad Pezeshki

updates.py in pep8

上级 d9671761
......@@ -26,9 +26,9 @@ class OrderedUpdates(OrderedDict):
"""
def __init__(self, *key, **kwargs):
if (len(key) >= 1 and
isinstance(key[0], dict) and
len(key[0]) > 1 and
not isinstance(key[0], OrderedDict)):
isinstance(key[0], dict) and
len(key[0]) > 1 and
not isinstance(key[0], OrderedDict)):
# Warn when using as input a non-ordered dictionary.
warnings.warn('Initializing an `OrderedUpdates` from a '
'non-ordered dictionary with 2+ elements could '
......@@ -62,8 +62,8 @@ class OrderedUpdates(OrderedDict):
if other is None:
return
if (isinstance(other, dict) and
len(other) > 1 and
not isinstance(other, OrderedDict)):
len(other) > 1 and
not isinstance(other, OrderedDict)):
# Warn about non-determinism.
warnings.warn('Updating an `OrderedUpdates` with a '
'non-ordered dictionary with 2+ elements could '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论