summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/search.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:55:15 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:55:22 -0700
commit6fa2d38be243531747241a3ae602069d507368d9 (patch)
tree7cc81446a97a372640f6a189f09b88fa466e77ce /python/fatcat_web/search.py
parent367b06f64546e4533662017c9dbe72aca175a294 (diff)
downloadfatcat-6fa2d38be243531747241a3ae602069d507368d9.tar.gz
fatcat-6fa2d38be243531747241a3ae602069d507368d9.zip
lint: simple, safe inline lint fixes
'==' vs 'is'; 'not a in b' vs 'a not in b'; etc
Diffstat (limited to 'python/fatcat_web/search.py')
-rw-r--r--python/fatcat_web/search.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_web/search.py b/python/fatcat_web/search.py
index 94c7431c..95f1f5c9 100644
--- a/python/fatcat_web/search.py
+++ b/python/fatcat_web/search.py
@@ -417,7 +417,7 @@ def get_elastic_search_coverage(query: ReleaseQuery) -> dict:
preservation_bucket = agg_to_dict(resp.aggregations.preservation)
preservation_bucket['total'] = _hits_total_int(resp.hits.total)
for k in ('bright', 'dark', 'shadows_only', 'none'):
- if not k in preservation_bucket:
+ if k not in preservation_bucket:
preservation_bucket[k] = 0
if app.config['FATCAT_MERGE_SHADOW_PRESERVATION']:
preservation_bucket['none'] += preservation_bucket['shadows_only']
@@ -490,7 +490,7 @@ def get_elastic_container_stats(ident, issnl=None, es_client=None, es_index=None
preservation_bucket = agg_to_dict(resp.aggregations.preservation)
preservation_bucket['total'] = _hits_total_int(resp.hits.total)
for k in ('bright', 'dark', 'shadows_only', 'none'):
- if not k in preservation_bucket:
+ if k not in preservation_bucket:
preservation_bucket[k] = 0
if merge_shadows:
preservation_bucket['none'] += preservation_bucket['shadows_only']