more on python type hint
This commit is contained in:
parent
eb5f2c5648
commit
b9b8e3a5f1
32 changed files with 185 additions and 48 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue