Skip to content

Commit

Permalink
refactor: fix type hint of function argument
Browse files Browse the repository at this point in the history
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
  • Loading branch information
davidculley and dae committed Aug 17, 2024
1 parent 941d8c3 commit 7f98c0b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pylib/anki/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ def have(self, id: NotetypeId) -> bool:
def current(self, for_deck: bool = True) -> NotetypeDict:
"Get current model. In new code, prefer col.defaults_for_adding()"
model_id = self.col.decks.current().get("mid")
assert model_id is not None
notetype = self.get(model_id)
if not for_deck or not notetype:
notetype = self.get(self.col.conf["curModel"])
Expand All @@ -154,7 +153,7 @@ def id_for_name(self, name: str) -> NotetypeId | None:
except NotFoundError:
return None

def get(self, id: NotetypeId) -> NotetypeDict | None:
def get(self, id: NotetypeId | None) -> NotetypeDict | None:
"Get model with ID, or None."
# deal with various legacy input types
if id is None:
Expand Down

0 comments on commit 7f98c0b

Please sign in to comment.