Page MenuHomeSoftware Heritage

D3702.diff
No OneTemporary

D3702.diff

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

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

Event Timeline