diff --git a/bookwyrm/models/author.py b/bookwyrm/models/author.py index 20c4e9e00..f5d35e3fe 100644 --- a/bookwyrm/models/author.py +++ b/bookwyrm/models/author.py @@ -53,22 +53,22 @@ class Author(BookDataModel): super().save(*args, **kwargs) @property - def isni_link(self): + def isni_link(self) -> str: """generate the url from the isni id""" clean_isni = re.sub(r"\s", "", self.isni) return f"https://isni.org/isni/{clean_isni}" @property - def openlibrary_link(self): + def openlibrary_link(self) -> str: """generate the url from the openlibrary id""" return f"https://openlibrary.org/authors/{self.openlibrary_key}" @property - def isfdb_link(self): + def isfdb_link(self) -> str: """generate the url from the isni id""" return f"https://www.isfdb.org/cgi-bin/ea.cgi?{self.isfdb}" - def get_remote_id(self): + def get_remote_id(self) -> str: """editions and works both use "book" instead of model_name""" return f"{BASE_URL}/author/{self.id}" diff --git a/mypy.ini b/mypy.ini index 600c370e4..95f97ee93 100644 --- a/mypy.ini +++ b/mypy.ini @@ -13,6 +13,11 @@ implicit_reexport = True [mypy-bookwyrm.connectors.*] ignore_errors = False +[mypy-bookwyrm.models.author] +ignore_errors = False +allow_untyped_calls = True +disable_error_code = import-untyped, assignment + [mypy-bookwyrm.utils.*] ignore_errors = False