aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/arabesque.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-03 13:57:18 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-03 16:46:07 -0700
commit5d29d1336afc90d3575a0379a9e9d9bdac8d1856 (patch)
treec22755cdf2615453ab1f3b7ddaf13becd946a63d /python/fatcat_tools/importers/arabesque.py
parentcaf1cb316ed18820f3239a285ef14bf45ef963a2 (diff)
downloadfatcat-5d29d1336afc90d3575a0379a9e9d9bdac8d1856.tar.gz
fatcat-5d29d1336afc90d3575a0379a9e9d9bdac8d1856.zip
typing: relatively simple type check fixes
These mostly add new variable names so that existing variables aren't overwritten with a new type; delay coercing '{}' or '[]' to 'None' until the last minute; adding is-not-None checks to conditional clauses; and similar small changes.
Diffstat (limited to 'python/fatcat_tools/importers/arabesque.py')
-rw-r--r--python/fatcat_tools/importers/arabesque.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/arabesque.py b/python/fatcat_tools/importers/arabesque.py
index 2fb7be55..b4a4d9ed 100644
--- a/python/fatcat_tools/importers/arabesque.py
+++ b/python/fatcat_tools/importers/arabesque.py
@@ -176,11 +176,11 @@ class ArabesqueMatchImporter(EntityImporter):
]
if len(existing.urls) > SANE_MAX_URLS:
self.counts["skip-update-too-many-url"] += 1
- return None
+ return False
existing.release_ids = list(set(fe.release_ids + existing.release_ids))
if len(existing.release_ids) > SANE_MAX_RELEASES:
self.counts["skip-update-too-many-url"] += 1
- return None
+ return False
existing.mimetype = existing.mimetype or fe.mimetype
edit = self.api.update_file(self.get_editgroup_id(), existing.ident, existing)
self._edits_inflight.append(edit)