Skip to content

Commit 4c64d9f

Browse files
committed
Fix linter issues
1 parent 3f421bb commit 4c64d9f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/pds_doi_service/core/input/pds4_util.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def map_list_author_editor_fields_to_doi_fields(self, list_authors):
147147
dict_authors = {}
148148

149149
for key, value in author.items():
150-
logger.debug(f": map_list_author_editor_fields_to_doi_fields.key,value " f"{key,value}")
150+
logger.debug(f": map_list_author_editor_fields_to_doi_fields.key,value " f"{key, value}")
151151
if key in field_map:
152152
new_key = field_map[key]
153153
dict_authors[new_key] = value
@@ -225,12 +225,12 @@ def get_list_auth_edit_cont(self, xml_tree, role_type: str):
225225
list_key = role_type.lower() + "s" # "authors" or "editors" or "contributors"
226226

227227
xpath = xpath_dict[f"xpath_list_{role_type.lower()}_class"]
228-
logger.debug(f": get_list_aec.xpath,role_type,xpath " f"{role_type,xpath}")
228+
logger.debug(f": get_list_aec.xpath,role_type,xpath " f"{role_type, xpath}")
229229

230230
list_aec_classes = xml_tree.xpath(xpath, namespaces=pds4_namespace)
231231
logger.debug(
232232
f": get_list_aec.xpath,list_aec_classes,len(list_aec_classes) "
233-
f"{role_type,list_aec_classes,len(list_aec_classes)}"
233+
f"{role_type, list_aec_classes, len(list_aec_classes)}"
234234
)
235235

236236
# for each Class in List_Auth:
@@ -259,7 +259,7 @@ def get_list_auth_edit_cont(self, xml_tree, role_type: str):
259259
xpath_person_attributes = xml_tree.xpath(xpath, namespaces=pds4_namespace)
260260
logger.debug(
261261
f": get_list_aec.xpath_person_attributes,len(xpath_person_attributes) "
262-
f"{xpath_person_attributes,len(xpath_person_attributes)}"
262+
f"{xpath_person_attributes, len(xpath_person_attributes)}"
263263
)
264264

265265
for xpath_person_attribute in xpath_person_attributes:
@@ -307,7 +307,7 @@ def get_list_auth_edit_cont(self, xml_tree, role_type: str):
307307
xpath_organization_attributes = xml_tree.xpath(xpath, namespaces=pds4_namespace)
308308
logger.debug(
309309
f": get_list_aec.xpath_organization_attributes,len(xpath_organization_attributes) "
310-
f"{xpath_organization_attributes,len(xpath_organization_attributes)}"
310+
f"{xpath_organization_attributes, len(xpath_organization_attributes)}"
311311
)
312312

313313
for xpath_organization_attribute in xpath_organization_attributes:
@@ -411,15 +411,15 @@ def read_pds4(self, xml_tree):
411411
# 202501 -- add logger
412412
logger.debug(f": xpath.dict.elements: " f"{type(elements)}")
413413
logger.debug(f": xpath.dict: key, xpath " f"{key, xpath}")
414-
logger.debug(f": xpath_dict.elements,len(xpath_dict.elements) " f"{elements,len(elements)}")
414+
logger.debug(f": xpath_dict.elements,len(xpath_dict.elements) " f"{elements, len(elements)}")
415415

416416
if elements:
417417
pds4_field_value_dict[key] = " ".join(
418418
[element.text.strip() for element in elements if element.text]
419419
).strip()
420420
# 20250501 -- add logger
421421
if elements:
422-
logger.debug(f": pds4_field_value_dict.key,value: " f"{key,pds4_field_value_dict[key]}")
422+
logger.debug(f": pds4_field_value_dict.key,value: " f"{key, pds4_field_value_dict[key]}")
423423

424424
return pds4_field_value_dict
425425

@@ -575,7 +575,7 @@ def process_pds4_fields(self, pds4_fields):
575575
elif o_best_method == BestParserMethod.BY_SEMI_COLON:
576576
authors_list = pds4_fields["authors"].split(";")
577577
else:
578-
logger.error(f"o_best_method,pds4_fields['authors'] " f"{o_best_method,pds4_fields['authors']}")
578+
logger.error(f"o_best_method,pds4_fields['authors'] " f"{o_best_method, pds4_fields['authors']}")
579579
raise InputFormatException("Cannot split the authors using comma or semi-colon.")
580580
else:
581581
logger.warning("No 'authors' field found in PDS4 label. Using empty authors list.")

0 commit comments

Comments
 (0)