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(