aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/entity_helpers.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/entity_helpers.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/entity_helpers.py')
-rw-r--r--python/fatcat_web/entity_helpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py
index 26371341..5522f3b5 100644
--- a/python/fatcat_web/entity_helpers.py
+++ b/python/fatcat_web/entity_helpers.py
@@ -45,7 +45,7 @@ def enrich_fileset_entity(entity):
if entity.state in ('redirect', 'deleted'):
return entity
entity._total_size = None
- if entity.manifest != None:
+ if entity.manifest is not None:
entity._total_size = sum([f.size for f in entity.manifest]) or 0
return entity
@@ -93,7 +93,7 @@ def enrich_release_entity(entity):
c.role in ('author', None) and
(c.surname or c.raw_name or (c.creator and c.creator.surname))
]
- entity._authors = sorted(authors, key=lambda c: (c.index == None and 99999999) or c.index)
+ entity._authors = sorted(authors, key=lambda c: (c.index is None and 99999999) or c.index)
# need authors, title for citeproc to work
entity._can_citeproc = bool(entity._authors) and bool(entity.title)
if entity.abstracts: