diff --git a/robyn/reloader.py b/robyn/reloader.py index cdc59d72..47233ee4 100644 --- a/robyn/reloader.py +++ b/robyn/reloader.py @@ -4,7 +4,7 @@ import subprocess import sys import time -from typing import List +from typing import List, Union from watchdog.events import FileSystemEventHandler from watchdog.observers import Observer @@ -115,7 +115,7 @@ class EventHandler(FileSystemEventHandler): def __init__(self, file_path: str, directory_path: str) -> None: self.file_path = file_path self.directory_path = directory_path - self.process: subprocess.Popen[bytes] | None = None # Keep track of the subprocess + self.process: Union[subprocess.Popen[bytes], None] = None # Keep track of the subprocess self.built_rust_binaries: List = [] # Keep track of the built rust binaries self.last_reload = time.time() # Keep track of the last reload. EventHandler is initialized with the process.