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

@ -195,7 +195,7 @@ class CheckboxList(FrameScroll):
self.clicked = clicked
self.frame.columnconfigure(0, weight=1)
def add(self, name, checked):
def add(self, name: str, checked: bool):
var = tk.BooleanVar(value=checked)
func = partial(self.clicked, name, var)
checkbox = ttk.Checkbutton(self.frame, text=name, variable=var, command=func)