Skip to content

Commit

Permalink
Address comments in ead.py
Browse files Browse the repository at this point in the history
* Remove assignments for private methods retrieving 'controlaccess', 'archdesc',
  and 'did' elements
  • Loading branch information
jonavellecuerdo committed Jun 5, 2024
1 parent b3cd72b commit cc25014
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions transmogrifier/sources/xml/ead.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ def get_citation(cls, source_record: Tag) -> str | None:
@classmethod
def get_content_type(cls, source_record: Tag) -> list[str] | None:
content_types = ["Archival materials"]
control_access_elements = cls._get_control_access(source_record)
for control_access_element in control_access_elements:
for control_access_element in cls._get_control_access(source_record):
_content_types = [
content_type
for content_type_element in control_access_element.find_all("genreform")
Expand Down Expand Up @@ -371,10 +370,11 @@ def _get_contributor_identifier_url(cls, name_element: Tag) -> list | None:
@classmethod
def get_dates(cls, source_record: Tag) -> list[timdex.Date] | None:
dates = []
collection_description_did = cls._get_collection_description_did(source_record)
source_record_id = cls.get_source_record_id(source_record)
dates.extend(
cls._parse_date_elements(collection_description_did, source_record_id)
cls._parse_date_elements(
cls._get_collection_description_did(source_record), source_record_id
)
)
return dates or None

Expand Down Expand Up @@ -475,8 +475,7 @@ def get_languages(cls, source_record: Tag) -> list[str] | None:
@classmethod
def get_locations(cls, source_record: Tag) -> list[timdex.Location] | None:
locations = []
control_access_elements = cls._get_control_access(source_record)
for control_access_element in control_access_elements:
for control_access_element in cls._get_control_access(source_record):
locations.extend(
[
timdex.Location(value=location)
Expand Down

0 comments on commit cc25014

Please sign in to comment.