Skip to content

Commit 9113691

Browse files
committed
feat: Temporarily ignore three too-complex methods
Let's get flake8 to look at everything else and fix these in a next step.
1 parent e13378f commit 9113691

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ckanext/dcatapchharvest/harvesters.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def before_download(self, url, harvest_job):
7171
url = url.replace("ogd.global.szh.loc", "data.stadt-zuerich.ch")
7272
return url, []
7373

74-
def _get_guid(self, dataset_dict, source_url=None):
74+
def _get_guid(self, dataset_dict, source_url=None): # noqa C901
7575
"""
7676
Try to get a unique identifier for a harvested dataset
7777
It will be the first found of:
@@ -82,6 +82,8 @@ def _get_guid(self, dataset_dict, source_url=None):
8282
The last two are obviously not optimal, as depend on title, which
8383
might change.
8484
Returns None if no guid could be decided.
85+
86+
TODO: This method is too complex (flake8 says 16). Refactor it!
8587
"""
8688
guid = None
8789

ckanext/dcatapchharvest/profiles.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ def _get_groups(self, subject):
542542
# Deduplicate group names before returning list of group dicts
543543
return [{"name": name} for name in list(set(group_names))]
544544

545-
def parse_dataset(self, dataset_dict, dataset_ref):
545+
def parse_dataset(self, dataset_dict, dataset_ref): # noqa C901
546+
# TODO: This method is too complex (flake8 says 30). Refactor it!
546547
log.debug(f"Parsing dataset '{dataset_ref!r}'")
547548

548549
dataset_dict["temporals"] = []
@@ -760,7 +761,8 @@ def parse_dataset(self, dataset_dict, dataset_ref):
760761

761762
return dataset_dict
762763

763-
def graph_from_dataset(self, dataset_dict, dataset_ref):
764+
def graph_from_dataset(self, dataset_dict, dataset_ref): # noqa C901
765+
# TODO: This method is too complex (flake8 says 49, I am amazed). Refactor it!
764766

765767
log.debug(f"Create graph from dataset '{dataset_dict['name']}'")
766768

0 commit comments

Comments
 (0)