HomeSoftware Heritage

Make StorageInterface a Protocol.

Description

Make StorageInterface a Protocol.

We're already using 'StorageInterface' as type annotation where we expect an object
that implements the same methods, but it isn't technically correct since these
objects aren't an instance of a subclass.

Making StorageInterface a protocol reflects how we already use it, without
lying to mypy.

Details

Provenance
vlorentzAuthored on Sep 1 2020, 10:38 AM
vlorentzPushed on Sep 1 2020, 12:21 PM
Differential Revision
D3855: Make StorageInterface a Protocol.
Parents
rDSTO5afd985ebd72: Add a validating storage proxy, to check ids before insertion.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 14851
Build 22879: test-and-buildJenkins console · Jenkins