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, such as D6281) to access it without 'type: ignore'.
Differential D6282
HashableObject: Add type annotation for 'id' attribute vlorentz on Sep 16 2021, 2:09 PM. Authored by Tags None Subscribers None
Details
This class is a mixin that only works with classes that define It also allows generic functions (that take a HashableObject
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D6282 (id=22748)Rebasing onto e8794971bd... Current branch diff-target is up to date. Changes applied before testcommit b6f5e30b53c8331b19a40a3c086af8ffa3a7e222 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Sep 16 14:09:15 2021 +0200 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'. See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/369/ for more details. |