pygui: added type hinting to class variables for core.gui.dialogs
This commit is contained in:
parent
11be40bc90
commit
527d34e374
37 changed files with 664 additions and 613 deletions
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from core.gui.dialogs.dialog import Dialog
|
||||
from core.gui.themes import FRAME_PAD, PADX, PADY
|
||||
|
@ -13,8 +13,8 @@ if TYPE_CHECKING:
|
|||
class FindDialog(Dialog):
|
||||
def __init__(self, app: "Application") -> None:
|
||||
super().__init__(app, "Find", modal=False)
|
||||
self.find_text = tk.StringVar(value="")
|
||||
self.tree = None
|
||||
self.find_text: tk.StringVar = tk.StringVar(value="")
|
||||
self.tree: Optional[ttk.Treeview] = None
|
||||
self.draw()
|
||||
self.protocol("WM_DELETE_WINDOW", self.close_dialog)
|
||||
self.bind("<Return>", self.find_node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue