Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123191
D8988.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8988.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 2:20 AM (1 d, 22 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3213788
Attached To
D8988: Use the correct type annotations in the Person resolver
Event Timeline
Log In to Comment