type hinting

This commit is contained in:
Huy Pham 2020-01-14 14:02:37 -08:00
parent c22f1680f7
commit a0c04c0809
5 changed files with 30 additions and 18 deletions

View file

@ -1,11 +1,14 @@
import logging
import threading
from typing import Callable, Optional
from typing import TYPE_CHECKING, Callable
if TYPE_CHECKING:
from core.gui.app import Application
class BackgroundTask:
def __init__(
self, master, task: Callable, callback: Optional[Callable] = None, args=()
self, master: "Application", task: Callable, callback: Callable = None, args=()
):
self.master = master
self.args = args