diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-04-14 23:00:33 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-04-14 23:00:33 +0200 |
commit | 1ffae095fdcbe78cf0c3eae21c9725ef9b1aacc1 (patch) | |
tree | 2fe6ca9da3c9c66242930cb1cb40371259a52528 /fuzzycat | |
parent | 1a096a775e13b8b2c6f90d706a5805cb047a6372 (diff) | |
download | fuzzycat-1ffae095fdcbe78cf0c3eae21c9725ef9b1aacc1.tar.gz fuzzycat-1ffae095fdcbe78cf0c3eae21c9725ef9b1aacc1.zip |
fix imports and formatting
Diffstat (limited to 'fuzzycat')
-rw-r--r-- | fuzzycat/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fuzzycat/utils.py b/fuzzycat/utils.py index bd7ceed..8e1ffb0 100644 --- a/fuzzycat/utils.py +++ b/fuzzycat/utils.py @@ -19,6 +19,7 @@ CHEM_FORMULA = re.compile(r"([A-Z]{1,2}[0-9]{1,2})+") ParsedPages = collections.namedtuple("ParsedPages", "start end count") + def es_compat_hits_total(resp): """ Given a search response dict, support ES6 and ES7 style total value. See: @@ -32,6 +33,7 @@ def es_compat_hits_total(resp): except TypeError: return resp["hits"]["total"] + def parse_page_string(s): """ Parse typical page strings, e.g. 150-180. |