From f9b69d0b4343403ecf9318dc6d66725f6144edad Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 15 Feb 2022 20:59:03 -0800 Subject: hack around mypy complaints --- python/fatcat_web/search.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'python/fatcat_web/search.py') diff --git a/python/fatcat_web/search.py b/python/fatcat_web/search.py index b48302b0..913d6696 100644 --- a/python/fatcat_web/search.py +++ b/python/fatcat_web/search.py @@ -247,7 +247,7 @@ def get_elastic_container_random_releases(ident: str, limit: int = 5) -> List[Di return results -def _sort_vol_key(val: Optional[str]) -> Tuple[bool, bool, int, str]: +def _sort_vol_key(val: Optional[Any]) -> Tuple[bool, bool, int, str]: """ Helper for sorting volume and issue strings. Defined order is: @@ -255,7 +255,10 @@ def _sort_vol_key(val: Optional[str]) -> Tuple[bool, bool, int, str]: - any non-integers next, in non-integer order - any integers next, in integer sorted order (ascending) - Note that the actual sort used/displayed is reversed + Note that the actual sort used/displayed is reversed. + + TODO: 'val' should actually be Optional[str], but getting a mypy error I + don't know how to hack around quickly right now. """ if val is None: return (False, False, 0, "") -- cgit v1.2.3