diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-03 12:29:39 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-03 12:31:07 -0700 |
commit | 10a2374051568edf3d872988e730328d899a0fdd (patch) | |
tree | 795be5e149a021f84bc4305c1811e63cc86f7aa1 /python/fatcat_tools/transforms/entities.py | |
parent | cfab1ddcd8a05b62ecc16763d18a6ecee8fa234f (diff) | |
download | fatcat-10a2374051568edf3d872988e730328d899a0fdd.tar.gz fatcat-10a2374051568edf3d872988e730328d899a0fdd.zip |
typing: first batch of python bulk type annotations
While these changes are more delicate than simple lint changes, this
specific batch of edits and annotations was *relatively* simple, and
resulted in few code changes other than function signature additions.
Diffstat (limited to 'python/fatcat_tools/transforms/entities.py')
-rw-r--r-- | python/fatcat_tools/transforms/entities.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/fatcat_tools/transforms/entities.py b/python/fatcat_tools/transforms/entities.py index ee4017d8..e5da633f 100644 --- a/python/fatcat_tools/transforms/entities.py +++ b/python/fatcat_tools/transforms/entities.py @@ -36,7 +36,9 @@ def entity_from_json( return api_client.deserialize(thing, entity_type) -def entity_from_dict(obj: Mapping[str, Any], entity_type, api_client=None): +def entity_from_dict( + obj: Mapping[str, Any], entity_type: Any, api_client: Optional[ApiClient] = None +) -> Any: json_str = json.dumps(obj) return entity_from_json(json_str, entity_type, api_client=api_client) |