Lint with mypy on CI - #219
Conversation
|
@nihalxkumar You modified some of these files in your PR, I think that it is easier:
Rather than fixing those errors in a separate PR, as that might cause some merge conflicts. |
|
I ran the mypy check on my branch. It reports the same 34 errors already present on main, with no new errors from my changes |
Bodies of untyped functions are not checked, so you can add return type to functions you added to make mypy lint them. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #219 +/- ##
==========================================
- Coverage 71.42% 71.37% -0.06%
==========================================
Files 12 12
Lines 1344 1345 +1
==========================================
Hits 960 960
- Misses 384 385 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🙋 My patch for 213: https://gist.github.com/nihalxkumar/b5d76eb71ba8ebaa45ac90af08d6e9b2 |
I was trying to circumvent a mypy error that entrypoint had two types, |
|
|
||
| def add_new_download( | ||
| self, _user_data, description: str, total_to_download: float | ||
| self, _user_data, description: str, total_to_download: int |
There was a problem hiding this comment.
This (and other changes to function signatures in this class) is wrong - the function is called by libdnf and according to its documentation it uses float here:
| add_new_download(self, user_data, description, total_to_download)
| Notify the client that a new download has been created.
| :type user_data: void
| :param user_data: User data entered together with url/package to download.
| :type description: string
| :param description: The message describing new download (url/packagename).
| :type total_to_download: float
| :param total_to_download: Total number of bytes to download.
| :rtype: void
| :return: Associated user data for new download.
There was a problem hiding this comment.
Thanks. Was this automatic detection somehow that I could have done via editor or some other tool? To fix, I looked at help(libdnf5.repo.DownloadCallbacks.add_new_download).
There was a problem hiding this comment.
Nope, I just checked type changes in this PR that looked suspicious to me.
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026073102-devel&flavor=pull-requests Test run included the following:
Upload failures
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026050504-devel&flavor=update
Failed tests16 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/176874#dependencies 21 fixed
Unstable testsDetails
Performance TestsPerformance degradation:22 performance degradations
Remaining performance tests:89 tests
|
I'd like mypy to run on #213.