Skip to content

Commit

Permalink
Silence selected C901 errors
Browse files Browse the repository at this point in the history
Signed-off-by: Shah, Karan <[email protected]>
  • Loading branch information
MasterSkepticista committed Dec 2, 2024
1 parent e976d19 commit bde431b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions openfl/experimental/workflow/utilities/metaflow_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def __init__(self, func_ast, decos, doc):
# these attributes are populated by _postprocess
self.is_inside_foreach = False

def _parse(self, func_ast):
def _parse(self, func_ast): # noqa: C901
self.num_args = len(func_ast.args.args)
tail = func_ast.body[-1]

Expand Down Expand Up @@ -319,7 +319,7 @@ def __init__(

@only_if_not_done
@require_mode("w")
def save_artifacts(self, artifacts_iter, force_v4=False, len_hint=0):
def save_artifacts(self, artifacts_iter, force_v4=False, len_hint=0): # noqa: C901
"""Saves Metaflow Artifacts (Python objects) to the datastore and
stores any relevant metadata needed to retrieve them.
Expand Down
2 changes: 1 addition & 1 deletion openfl/experimental/workflow/utilities/runtime_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def artifacts_iter():
return artifacts_iter, cls_attrs


def filter_attributes(ctx, f, **kwargs):
def filter_attributes(ctx, f, **kwargs): # noqa: C901
"""Filters out attributes from the next task in the flow based on inclusion
or exclusion.
Expand Down
4 changes: 2 additions & 2 deletions openfl/experimental/workflow/workspace_export/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def __get_class_name_and_sourcecode_from_parent_class(self, parent_class):

return None, None

def __extract_class_initializing_args(self, class_name):
def __extract_class_initializing_args(self, class_name): # noqa: C901
"""Provided name of the class returns expected arguments and it's
values in form of dictionary."""
instantiation_args = {"args": {}, "kwargs": {}}
Expand Down Expand Up @@ -333,7 +333,7 @@ def update_dictionary(args: dict, data: dict, dtype: str = "args"):

self.__write_yaml(plan, data)

def generate_data_yaml(self):
def generate_data_yaml(self): # noqa: C901
"""Generates data.yaml."""
# Import python script if not already
if not hasattr(self, "exported_script_module"):
Expand Down

0 comments on commit bde431b

Please sign in to comment.