Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apport-kde: drop unused Dialog.addButton #332

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

bdrung
Copy link
Collaborator

@bdrung bdrung commented Jun 7, 2024

mypy complains on Ubuntu 24.04 (noble):

kde/apport-kde:96: error: Incompatible return value type (got "QPushButton | None", expected "QPushButton")  [return-value]

Dialog.addButton is not used. ui_question_yesno uses QMessageBox.question, ui_question_choice uses ChoicesDialog, and ui_question_file uses QFileDialog.getOpenFileName.

@bdrung bdrung requested a review from schopin-pro June 7, 2024 10:12
Copy link

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.54%. Comparing base (b0a80f0) to head (861a032).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #332      +/-   ##
==========================================
+ Coverage   82.53%   82.54%   +0.01%     
==========================================
  Files          94       94              
  Lines       19366    19362       -4     
  Branches     3114     3114              
==========================================
- Hits        15983    15982       -1     
+ Misses       2887     2884       -3     
  Partials      496      496              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdrung bdrung removed the request for review from schopin-pro June 7, 2024 10:44
@bdrung bdrung changed the title apport-kde: assert addButton does not return None apport-kde: drop unused Dialog.addButton Jun 10, 2024
mypy complains on Ubuntu 24.04 (noble):

```
kde/apport-kde:96: error: Incompatible return value type (got "QPushButton | None", expected "QPushButton")  [return-value]
```

`Dialog.addButton` is not used. `ui_question_yesno` uses
`QMessageBox.question`, `ui_question_choice` uses `ChoicesDialog`, and
`ui_question_file` uses `QFileDialog.getOpenFileName`.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Add `python3-pyqt5` to linter container to allow mypy to check the PyQt
code.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
@schopin-pro schopin-pro merged commit 05c25d1 into canonical:main Jun 11, 2024
21 checks passed
@bdrung bdrung deleted the fix-return-type branch June 11, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants