Skip to content

Commit 41322e3

Browse files
committed
fix(tkinter_show.py): Fix mypy and pylint warnings
1 parent d04c93e commit 41322e3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ardupilot_methodic_configurator/frontend_tkinter_show.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ class Tooltip:
5050
"""
5151

5252
def __init__(self, widget: tk.Widget, text: str, position_below: bool = True) -> None:
53-
self.widget = widget
54-
self.text = text
55-
self.tooltip = None
56-
self.position_below = position_below
53+
self.widget: tk.Widget = widget
54+
self.text: str = text
55+
self.tooltip: Optional[tk.Toplevel] = None
56+
self.position_below: bool = position_below
5757

5858
# Bind the <Enter> and <Leave> events to show and hide the tooltip
5959
self.widget.bind("<Enter>", self.show)

tests/test_frontend_tkinter_show.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
import pytest
1717

18+
# pylint: disable=redefined-outer-name
19+
20+
1821
from ardupilot_methodic_configurator.frontend_tkinter_show import (
1922
Tooltip,
2023
show_error_message,

0 commit comments

Comments
 (0)