Typehint label / log / spinner / storage#458
Conversation
Yes, I think so.
It's a library, the function may be called externally. That said, type hint instead of this is probably enough.
Can
See above. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #458 +/- ##
==========================================
+ Coverage 76.36% 76.40% +0.03%
==========================================
Files 53 53
Lines 9399 9419 +20
==========================================
+ Hits 7178 7197 +19
- Misses 2221 2222 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
def __init__(self, app: QubesBase, name: str | None=None):As per your comment I made |
ad313a4 to
143aa64
Compare
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026040702-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026032404-devel&flavor=update
Failed tests20 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/170766#dependencies 28 fixed
Unstable testsDetailsPerformance TestsPerformance degradation:10 performance degradations
Remaining performance tests:101 tests
|
Major: type-hint
storage.pyMinor: type-hint
label.py spinner.py log.pyComments (for
storage.py)1. safe assert
In
__lt__we haveTechnically,
_vidis supposed to be non-None ifpoolis non-None, not the other way around. Shouldn't it beif self.pool and other.pool:?Type error raise
In
revert:but typing
def revert(self, revision: str) -> None:raises no type-checker error, indicating that it's never called with a non-str argument. Is the raise really necessary ?None
__str__but
self.namecan beNone, and__str__should never beNone. I added anassert is not Nonefor now.LT assert
What guarantees that
self.nameorother.nameis defined here ?