diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-03 13:57:18 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-03 16:46:07 -0700 |
commit | 5d29d1336afc90d3575a0379a9e9d9bdac8d1856 (patch) | |
tree | c22755cdf2615453ab1f3b7ddaf13becd946a63d /python/fatcat_tools/importers/fileset_generic.py | |
parent | caf1cb316ed18820f3239a285ef14bf45ef963a2 (diff) | |
download | fatcat-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/fileset_generic.py')
-rw-r--r-- | python/fatcat_tools/importers/fileset_generic.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/fatcat_tools/importers/fileset_generic.py b/python/fatcat_tools/importers/fileset_generic.py index 2207b938..d0c8b221 100644 --- a/python/fatcat_tools/importers/fileset_generic.py +++ b/python/fatcat_tools/importers/fileset_generic.py @@ -43,7 +43,8 @@ class FilesetImporter(EntityImporter): self.counts["skip-no-files"] += 1 return False - for f in row.get("manifest"): + manifest: List[Dict[str, Any]] = row.get("manifest") or [] + for f in manifest: for k in ("sha1", "md5"): if not f.get(k): self.counts["skip-missing-file-field"] += 1 |