提交 a3713927 authored 作者: David Warde-Farley's avatar David Warde-Farley

PEP8 fixes.

上级 c57d83a0
...@@ -241,7 +241,7 @@ class Method(Component): ...@@ -241,7 +241,7 @@ class Method(Component):
function call. function call.
""" """
outputs=None outputs = None
"""function outputs (see `compile.function`)""" """function outputs (see `compile.function`)"""
updates = {} updates = {}
...@@ -260,7 +260,7 @@ class Method(Component): ...@@ -260,7 +260,7 @@ class Method(Component):
""" """
mode=None mode = None
"""This will override the Module compilation mode for this Method""" """This will override the Module compilation mode for this Method"""
def __init__(self, inputs, outputs, updates=None, mode=None): def __init__(self, inputs, outputs, updates=None, mode=None):
...@@ -341,7 +341,7 @@ class Method(Component): ...@@ -341,7 +341,7 @@ class Method(Component):
""" """
return None return None
def build(self, mode, memo, allocate_all = False): def build(self, mode, memo, allocate_all=False):
"""Compile a function for this Method. """Compile a function for this Method.
:param allocate_all: if True, storage will be :param allocate_all: if True, storage will be
...@@ -575,7 +575,7 @@ class Composite(Component): ...@@ -575,7 +575,7 @@ class Composite(Component):
""" """
raise NotImplementedError raise NotImplementedError
def flat_components(self, include_self = False): def flat_components(self, include_self=False):
""" """
Generator that yields each component in a flattened hierarchy Generator that yields each component in a flattened hierarchy
of composites and components. If include_self is True, the of composites and components. If include_self is True, the
......
...@@ -43,7 +43,8 @@ class MyOp(Op): ...@@ -43,7 +43,8 @@ class MyOp(Op):
return self.name return self.name
def __eq__(self, other): def __eq__(self, other):
return self is other or isinstance(other, MyOp) and self.x is not None and self.x == other.x return (self is other or isinstance(other, MyOp) and self.x is not None
and self.x == other.x)
def __hash__(self): def __hash__(self):
if self.x is not None: if self.x is not None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论