-
Committer:
Simon Chopin
-
Author(s):
Benjamin Drung
-
Date:
2023-04-28 07:54:42 UTC
-
Revision ID:
git-v1:90ae21cb241bc8933ef7f21d677960e5b8c8bbce
refactor(gtk/kde): Add assertions to make mypy happy
mypy complains:
```
gtk/apport-gtk:238: error: "None" has no attribute "get" [attr-defined]
gtk/apport-gtk:280: error: Value of type "None" is not indexable [index]
gtk/apport-gtk:413: error: Unsupported right operand type for in ("None") [operator]
gtk/apport-gtk:414: error: Value of type "None" is not indexable [index]
kde/apport-kde:130: error: "QObject" has no attribute "setRange" [attr-defined]
kde/apport-kde:131: error: "QObject" has no attribute "setValue" [attr-defined]
kde/apport-kde:133: error: "QObject" has no attribute "setRange" [attr-defined]
kde/apport-kde:134: error: "QObject" has no attribute "setValue" [attr-defined]
kde/apport-kde:413: error: Incompatible types in assignment (expression has type "ReportDialog", variable has type "None") [assignment]
kde/apport-kde:417: error: "None" has no attribute "exec_" [attr-defined]
kde/apport-kde:426: error: "None" has no attribute "continue_button" [attr-defined]
kde/apport-kde:429: error: "None" has no attribute "send_error_report" [attr-defined]
kde/apport-kde:431: error: "None" has no attribute "ignore_future_problems" [attr-defined]
kde/apport-kde:516: error: "None" has no attribute "set" [attr-defined]
kde/apport-kde:518: error: "None" has no attribute "set" [attr-defined]
```
Add assertions to ensure that the variables are not `None`.
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>