Skip to content

Commit

Permalink
Updates based on discussion in PR #194
Browse files Browse the repository at this point in the history
* Remove list() from .extend calls
  • Loading branch information
ehanson8 committed Jun 18, 2024
1 parent 03ff50b commit cc10b97
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions transmogrifier/sources/xml/dspace_dim.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,9 @@ def get_contents(cls, source_record: Tag) -> list[str] | None:

@classmethod
def get_contributors(cls, source_record: Tag) -> list[timdex.Contributor] | None:
contributors = []
contributors.extend(list(cls._get_creators(source_record)))
contributors.extend(
list(cls._get_contributors_by_contributor_element(source_record))
)
contributors: list[timdex.Contributor] = []
contributors.extend(cls._get_creators(source_record))
contributors.extend(cls._get_contributors_by_contributor_element(source_record))
return contributors or None

@classmethod
Expand Down Expand Up @@ -278,7 +276,7 @@ def get_dates(cls, source_record: Tag) -> list[timdex.Date] | None:
value=date_value, kind=date.get("qualifier") or None
)
dates.append(date_object)
dates.extend(list(cls._get_coverage_dates(source_record)))
dates.extend(cls._get_coverage_dates(source_record))
return dates or None

@classmethod
Expand Down

0 comments on commit cc10b97

Please sign in to comment.