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,9 +1,12 @@
import logging
import threading
from typing import Callable, Optional
class BackgroundTask:
def __init__(self, master, task, callback=None, args=()):
def __init__(
self, master, task: Callable, callback: Optional[Callable] = None, args=()
):
self.master = master
self.args = args
self.task = task