Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7085340
D3707.id13069.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
D3707.id13069.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
@@ -462,7 +462,7 @@
return {"revision:add": len(revisions)}
- def revision_missing(self, revisions):
+ def revision_missing(self, revisions: List[Sha1Git]) -> Iterable[Sha1Git]:
return self._cql_runner.revision_missing(revisions)
def revision_get(self, revisions):
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
@@ -522,7 +522,7 @@
return {"revision:add": count}
- def revision_missing(self, revisions):
+ def revision_missing(self, revisions: List[Sha1Git]) -> Iterable[Sha1Git]:
for id in revisions:
if id not in self._revisions:
yield id
diff --git a/swh/storage/interface.py b/swh/storage/interface.py
--- a/swh/storage/interface.py
+++ b/swh/storage/interface.py
@@ -508,11 +508,11 @@
...
@remote_api_endpoint("revision/missing")
- def revision_missing(self, revisions):
+ def revision_missing(self, revisions: List[Sha1Git]) -> Iterable[Sha1Git]:
"""List revisions missing from storage
Args:
- revisions (iterable): revision ids
+ revisions: revision ids
Yields:
missing revision ids
diff --git a/swh/storage/storage.py b/swh/storage/storage.py
--- a/swh/storage/storage.py
+++ b/swh/storage/storage.py
@@ -604,9 +604,11 @@
@timed
@db_transaction_generator()
- def revision_missing(self, revisions, db=None, cur=None):
+ def revision_missing(
+ self, revisions: List[Sha1Git], db=None, cur=None
+ ) -> Iterable[Sha1Git]:
if not revisions:
- return
+ return None
for obj in db.revision_missing_from_list(revisions, cur):
yield obj[0]
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 7:16 PM (15 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3228047
Attached To
D3707: storage*: revision_*: Type remaining existing endpoints
Event Timeline
Log In to Comment