Page MenuHomeSoftware Heritage

D8988.diff
No OneTemporary

D8988.diff

diff --git a/swh/graphql/resolvers/person.py b/swh/graphql/resolvers/person.py
--- a/swh/graphql/resolvers/person.py
+++ b/swh/graphql/resolvers/person.py
@@ -3,7 +3,9 @@
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
-from typing import List
+from typing import List, Optional
+
+from swh.model.model import Person as StoragePerson
from .base_connection import BaseList
from .base_node import BaseNode
@@ -15,7 +17,7 @@
pass
-def get_person_list(person) -> List[Person]:
+def get_person_list(person: Optional[StoragePerson]) -> List[StoragePerson]:
return [person] if person else []
@@ -28,7 +30,7 @@
_node_class = Person
- def _get_results(self) -> List[Person]:
+ def _get_results(self) -> List[StoragePerson]:
"""
Author is a single object in the current data model,
return it as a list to support future evolutions
@@ -45,7 +47,7 @@
_node_class = Person
- def _get_results(self) -> List[Person]:
+ def _get_results(self) -> List[StoragePerson]:
"""
Committer is a single object in the current data model,
return it as a list to support future evolutions
@@ -62,7 +64,7 @@
_node_class = Person
- def _get_results(self) -> List[Person]:
+ def _get_results(self) -> List[StoragePerson]:
"""
Author is a single object in the current data model,
return it as a list to support future evolutions

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 18, 2:20 AM (2 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3213788

Event Timeline