提交 15b8c753 authored 作者: Chinnadhurai Sankar's avatar Chinnadhurai Sankar

fix pep-8 errors in gof

上级 ad6a0499
...@@ -115,14 +115,12 @@ def failure_code(sub): ...@@ -115,14 +115,12 @@ def failure_code(sub):
def failure_code_init(sub): def failure_code_init(sub):
""" """
Code for failure in the struct init. Code for failure in the struct init.
Parameters: Parameters:
-------------- --------------
sub sub
Dictionary used to template the struct. Dictionary used to template the struct.
* failure_var -> must contain a variable name to use for * failure_var -> must contain a variable name to use for
the failure code. the failure code.
""" """
return '''{ return '''{
if (!PyErr_Occurred()) { if (!PyErr_Occurred()) {
...@@ -895,7 +893,6 @@ class CLinker(link.Linker): ...@@ -895,7 +893,6 @@ class CLinker(link.Linker):
""" """
Returns a list of support code strings that are needed by Returns a list of support code strings that are needed by
one or more Variables or Ops. one or more Variables or Ops.
The support code from Variables is added before the support code from Ops.This might contain duplicates. The support code from Variables is added before the support code from Ops.This might contain duplicates.
""" """
ret = [] ret = []
...@@ -1172,10 +1169,8 @@ class CLinker(link.Linker): ...@@ -1172,10 +1169,8 @@ class CLinker(link.Linker):
be allocated. be allocated.
storage_map: dict that map variables to storages. storage_map: dict that map variables to storages.
This is used when you need to customize the storage of This is used when you need to customize the storage of
this thunk. this thunk.keep_lock
keep_lock
WRITEME WRITEME
Returns: thunk, input_storage, output_storage Returns: thunk, input_storage, output_storage
The return values can be used as follows: The return values can be used as follows:
...@@ -1845,7 +1840,6 @@ def _default_checker(x, y): ...@@ -1845,7 +1840,6 @@ def _default_checker(x, y):
""" """
Default checker for DualLinker. This checks that the Default checker for DualLinker. This checks that the
variables contain the same data using ==. variables contain the same data using ==.
Parameters Parameters
------------- -------------
x,y x,y
......
...@@ -1474,7 +1474,6 @@ class ModuleCache(object): ...@@ -1474,7 +1474,6 @@ class ModuleCache(object):
def _rmtree(parent, ignore_nocleanup=False, msg='', level=logging.DEBUG, def _rmtree(parent, ignore_nocleanup=False, msg='', level=logging.DEBUG,
ignore_if_missing=False): ignore_if_missing=False):
""" """
On NFS filesystems, it is impossible to delete a directory with open On NFS filesystems, it is impossible to delete a directory with open
files in it. files in it.
......
...@@ -55,7 +55,6 @@ def thunk_hook(type, value, trace): ...@@ -55,7 +55,6 @@ def thunk_hook(type, value, trace):
This function is meant to replace excepthook and do some This function is meant to replace excepthook and do some
special work if the exception value has a __thunk_trace__ special work if the exception value has a __thunk_trace__
field. field.
In that case, it retrieves the field, which should In that case, it retrieves the field, which should
contain a trace as returned by L{traceback.extract_stack}, contain a trace as returned by L{traceback.extract_stack},
and prints it out on L{stderr}. and prints it out on L{stderr}.
...@@ -714,7 +713,6 @@ class LocalLinker(Linker): ...@@ -714,7 +713,6 @@ class LocalLinker(Linker):
def gc_helper(node_list): def gc_helper(node_list):
""" """
Return the set of Variable instances which are computed by node_list. Return the set of Variable instances which are computed by node_list.
Parameters Parameters
---------- ----------
node_list node_list
......
...@@ -982,7 +982,6 @@ class Op(utils.object2, PureOp, CLinkerOp): ...@@ -982,7 +982,6 @@ class Op(utils.object2, PureOp, CLinkerOp):
def make_node(self, *inputs): def make_node(self, *inputs):
""" """
Create a "apply" nodes for the inputs in that order. Create a "apply" nodes for the inputs in that order.
""" """
if not hasattr(self, 'itypes'): if not hasattr(self, 'itypes'):
raise NotImplementedError("You can either define itypes and otypes,\ raise NotImplementedError("You can either define itypes and otypes,\
...@@ -1189,7 +1188,6 @@ class OpenMPOp(Op): ...@@ -1189,7 +1188,6 @@ class OpenMPOp(Op):
def c_headers(self): def c_headers(self):
""" """
Return the header file name "omp.h" if openMP is supported Return the header file name "omp.h" if openMP is supported
""" """
self.update_self_openmp() self.update_self_openmp()
if self.openmp: if self.openmp:
......
...@@ -135,8 +135,6 @@ class Unification: ...@@ -135,8 +135,6 @@ class Unification:
""" """
This class represents a possible unification of a group of variables This class represents a possible unification of a group of variables
with each other or with tangible values. with each other or with tangible values.
Parameters Parameters
---------- ----------
inplace : bool inplace : bool
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论