HomeSoftware Heritage

HashableObject: Add type annotation for 'id' attribute

Description

HashableObject: Add type annotation for 'id' attribute

This class is a mixin that only works with classes that define
this attribute, so it makes sense to declare it.

It also allows generic functions (that take a HashableObject
parameter) to access it without 'type: ignore'.

Details

Provenance
vlorentzAuthored on Sep 16 2021, 2:09 PM
vlorentzPushed on Sep 16 2021, 2:21 PM
Differential Revision
D6282: HashableObject: Add type annotation for 'id' attribute
Parents
rDMODe8794971bdd8: Run Black
Branches
Unknown
Tags
Unknown
References
tag: v2.9.0
Build Status
Buildable 23683
Build 36969: test-and-buildJenkins console · Jenkins