Declare registry on MetricWrapperBase as Optional#754
Declare registry on MetricWrapperBase as Optional#754csmarchbanks merged 2 commits intoprometheus:masterfrom
registry on MetricWrapperBase as Optional#754Conversation
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
There was a problem hiding this comment.
Thanks and good catch! When I look at your linked PR you are also using a custom proxy registry instead of a CollectorRegistry. Perhaps for now we should just leave out type checking on the registry until a Protocol or abc is created?
Would you also be able to fix the same issue in Enum in this file as well?
Once merged I will cut 0.13.1
|
FYI I am also going to allow |
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
19bc32f to
86ddcac
Compare
I think it's fair enough to leave it as is (with the type annotations) — if people like us are so keen on doing dubious things then a
Thanks! I noticed they get cast to I've updated the PR to do the same for |
|
That sounds good, thanks! |
Dear maintainer @csmarchbanks,
The release of 0.13.0 yesterday appears to have caused us some type checking errors with Mypy (presumably this is a recent effort to annotate this library with types — thanks!).
I think this particular annotation is incomplete though — our code relies on passing
Nonehere and the code beneath says the following:In other words, I think this was intended to be optional.
Thanks!
Signed-off-by: Olivier Wilkinson (reivilibre) oliverw@matrix.org