From 29cf1a9f7e9f9021dff635628505407ec215b292 Mon Sep 17 00:00:00 2001 From: Rae Knowler Date: Mon, 2 Dec 2024 19:22:56 +0100 Subject: [PATCH] style: Ignore complexity of some methods --- ckanext/switzerland/harvester/base_sbb_harvester.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ckanext/switzerland/harvester/base_sbb_harvester.py b/ckanext/switzerland/harvester/base_sbb_harvester.py index 4b96a6ee..f50a9c2a 100644 --- a/ckanext/switzerland/harvester/base_sbb_harvester.py +++ b/ckanext/switzerland/harvester/base_sbb_harvester.py @@ -444,7 +444,7 @@ def fetch_stage(self, harvest_object): ) return False - def _fetch_stage(self, harvest_object): # noqa + def _fetch_stage(self, harvest_object): # noqa: C901 """ Fetching of resources. Runs once for each gathered resource. @@ -602,7 +602,7 @@ def import_stage(self, harvest_object): ) return False - def _import_stage(self, harvest_object): # noqa + def _import_stage(self, harvest_object): # noqa: C901 """ Importing the fetched files into CKAN storage. Runs once for each fetched resource. @@ -996,7 +996,8 @@ def _get_ordered_resources(self, package): return ordered_resources, unmatched_resources - def finalize(self, harvest_object, harvest_object_data): + def finalize(self, harvest_object, harvest_object_data): # noqa: C901 + # TODO: Simplify this method. user_name = self._get_user_name() context = {"model": model, "session": Session, "user": user_name} stage = "Import"