more on python type hint

This commit is contained in:
Huy Pham 2020-01-13 15:31:41 -08:00
parent eb5f2c5648
commit b9b8e3a5f1
32 changed files with 185 additions and 48 deletions

View file

@ -1,13 +1,22 @@
import tkinter as tk
from tkinter import ttk
from typing import Optional
from typing import TYPE_CHECKING, Optional
from core.gui.images import ImageEnum, Images
from core.gui.themes import DIALOG_PAD
if TYPE_CHECKING:
from core.gui.app import Application
class Dialog(tk.Toplevel):
def __init__(self, master, app, title, modal=False):
def __init__(
self,
master: tk.Widget,
app: "Application",
title: str,
modal: Optional[bool] = False,
):
super().__init__(master)
self.withdraw()
self.app = app