Skip to content

Commit

Permalink
Made changes to satisfy mypy.
Browse files Browse the repository at this point in the history
  • Loading branch information
JPBergsma committed Nov 30, 2022
1 parent 1e49fb8 commit 596bb73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion optimade/server/entry_collections/entry_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def find(

exclude_fields = self.all_fields - response_fields

results = [self.resource_mapper.map_back(doc) for doc in raw_results]
results: List = [self.resource_mapper.map_back(doc) for doc in raw_results]
self.check_and_add_missing_fields(results, response_fields)

if results:
Expand Down
4 changes: 2 additions & 2 deletions optimade/server/routers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def get_entries(
links = ToplevelLinks(next=None)

if exclude_fields:
results = remove_exclude_fields(results, exclude_fields)
results = remove_exclude_fields(results, exclude_fields) # type: ignore[assignment]

return response(
links=links,
Expand Down Expand Up @@ -312,7 +312,7 @@ def get_single_entry(
links = ToplevelLinks(next=None)

if exclude_fields and results is not None:
results = remove_exclude_fields(results, exclude_fields)[0]
results = remove_exclude_fields(results, exclude_fields)[0] # type: ignore[assignment]

return response(
links=links,
Expand Down

0 comments on commit 596bb73

Please sign in to comment.