Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124618
D3702.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
D3702.diff
View Options
diff --git a/swh/storage/cassandra/storage.py b/swh/storage/cassandra/storage.py
--- a/swh/storage/cassandra/storage.py
+++ b/swh/storage/cassandra/storage.py
@@ -178,8 +178,8 @@
partition_id: int,
nb_partitions: int,
limit: int = 1000,
- page_token: str = None,
- ):
+ page_token: Optional[str] = None,
+ ) -> Dict[str, Any]:
if limit is None:
raise StorageArgumentException("limit should not be None")
diff --git a/swh/storage/in_memory.py b/swh/storage/in_memory.py
--- a/swh/storage/in_memory.py
+++ b/swh/storage/in_memory.py
@@ -292,8 +292,8 @@
partition_id: int,
nb_partitions: int,
limit: int = 1000,
- page_token: str = None,
- ):
+ page_token: Optional[str] = None,
+ ) -> Dict[str, Any]:
if limit is None:
raise StorageArgumentException("limit should not be None")
(start, end) = get_partition_bounds_bytes(
diff --git a/swh/storage/interface.py b/swh/storage/interface.py
--- a/swh/storage/interface.py
+++ b/swh/storage/interface.py
@@ -208,8 +208,8 @@
partition_id: int,
nb_partitions: int,
limit: int = 1000,
- page_token: str = None,
- ):
+ page_token: Optional[str] = None,
+ ) -> Dict[str, Any]:
"""Splits contents into nb_partitions, and returns one of these based on
partition_id (which must be in [0, nb_partitions-1])
diff --git a/swh/storage/storage.py b/swh/storage/storage.py
--- a/swh/storage/storage.py
+++ b/swh/storage/storage.py
@@ -305,8 +305,8 @@
partition_id: int,
nb_partitions: int,
limit: int = 1000,
- page_token: str = None,
- ):
+ page_token: Optional[str] = None,
+ ) -> Dict[str, Any]:
if limit is None:
raise StorageArgumentException("limit should not be None")
(start, end) = get_partition_bounds_bytes(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 2:33 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3220118
Attached To
D3702: storage*: content_get_partition: Type remaining existing endpoints
Event Timeline
Log In to Comment