Skip to content

Commit

Permalink
Add type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-Friedrich committed Jun 25, 2022
1 parent c2874dc commit e81afa1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions audiorename/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def enrich_metadata(self) -> None:
break
self.mb_workid = work_bottom['id']
self.work = work_bottom['title']
wh_titles = []
wh_ids = []
wh_titles: List[str] = []
wh_ids: List[str] = []
for work in work_hierarchy:
wh_titles.append(work['title'])
wh_ids.append(work['id'])
Expand Down
13 changes: 5 additions & 8 deletions audiorename/musicbrainz.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,11 @@
'title': str,
})

WorkRelation = TypedDict(
'WorkRelation', {
'work': WorkChild,
'direction': Literal['backward'],
'type': Literal['parts']
}
)

WorkRelation = TypedDict('WorkRelation', {
'work': WorkChild,
'direction': Literal['backward'],
'type': Literal['parts']
})

Work = TypedDict('Work', {
'id': str,
Expand Down

0 comments on commit e81afa1

Please sign in to comment.