Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/backend.py
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | return ProvenanceCache( | ||||
revision_origin=RevisionCache(data={}, added=set()), | revision_origin=RevisionCache(data={}, added=set()), | ||||
revision_before_revision={}, | revision_before_revision={}, | ||||
revision_in_origin=set(), | revision_in_origin=set(), | ||||
) | ) | ||||
# TODO: maybe move this to a separate file | # TODO: maybe move this to a separate file | ||||
class ProvenanceBackend: | class ProvenanceBackend: | ||||
def __init__(self, storage: ProvenanceStorageInterface): | def __init__(self, storage: ProvenanceStorageInterface) -> None: | ||||
vlorentz: I don't think `__init__` needs/uses a return type | |||||
Done Inline ActionsWhen creating an __init__ method my IDE hints me to auto-complete it with a None return type. I guess it's not harmful anyway aeviso: When creating an `__init__` method my IDE hints me to auto-complete it with a `None` return… | |||||
self.storage = storage | self.storage = storage | ||||
self.cache = new_cache() | self.cache = new_cache() | ||||
def clear_caches(self) -> None: | def clear_caches(self) -> None: | ||||
self.cache = new_cache() | self.cache = new_cache() | ||||
def flush(self) -> None: | def flush(self) -> None: | ||||
# Revision-content layer insertions ############################################ | # Revision-content layer insertions ############################################ | ||||
▲ Show 20 Lines • Show All 255 Lines • Show Last 20 Lines |
I don't think __init__ needs/uses a return type