Skip to content

Commit

Permalink
fixup! Eliminate old-fashioned type annotations in src/azul/plugins/
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Sep 17, 2024
1 parent 93bf406 commit 1c36709
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/azul/plugins/metadata/hca/indexer/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Iterator,
Mapping,
Protocol,
Self,
TypeVar,
get_args,
)
Expand Down Expand Up @@ -392,14 +393,14 @@ def __init__(self, id: str, title: str, category: SubmitterCategory):
self.by_id[id] = self

@classmethod
def for_id(cls, submitter_id: str) -> 'Submitter | None':
def for_id(cls, submitter_id: str) -> Self | None:
try:
return cls.by_id[submitter_id]
except KeyError:
return None

@classmethod
def for_file(cls, file: api.File) -> 'Submitter | None':
def for_file(cls, file: api.File) -> Self | None:
if file.file_source is None:
if (
# The DCP/2 system design specification mistakenly required that
Expand Down

0 comments on commit 1c36709

Please sign in to comment.