mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
Give explicit types to util.Process.__init__
This gives better type hinting in the editor.
This commit is contained in:
parent
70d732ad36
commit
fe84887095
@ -5,14 +5,24 @@ import sys
|
||||
import threading
|
||||
from functools import wraps
|
||||
from logging.handlers import QueueHandler
|
||||
from typing import Any
|
||||
from typing import Any, Callable, Optional
|
||||
|
||||
import frigate.log
|
||||
|
||||
|
||||
class BaseProcess(mp.Process):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
name: Optional[str] = None,
|
||||
target: Optional[Callable] = None,
|
||||
args: tuple = (),
|
||||
kwargs: dict = {},
|
||||
daemon: Optional[bool] = None,
|
||||
):
|
||||
super().__init__(
|
||||
name=name, target=target, args=args, kwargs=kwargs, daemon=daemon
|
||||
)
|
||||
|
||||
def start(self, *args, **kwargs):
|
||||
self.before_start()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user