diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-15 20:59:03 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-15 20:59:03 -0800 |
commit | f9b69d0b4343403ecf9318dc6d66725f6144edad (patch) | |
tree | 0fe8a3ef272e6540de774b8d9d5138f143d83136 /python/fatcat_web/search.py | |
parent | ae97f4d8d4446d32b07efba587b57b741a16cfec (diff) | |
download | fatcat-f9b69d0b4343403ecf9318dc6d66725f6144edad.tar.gz fatcat-f9b69d0b4343403ecf9318dc6d66725f6144edad.zip |
hack around mypy complaints
Diffstat (limited to 'python/fatcat_web/search.py')
-rw-r--r-- | python/fatcat_web/search.py | 7 |
1 files changed, 5 insertions, 2 deletions
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, "") |