Skip to content

Commit

Permalink
Use Union for Python 3.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dave42w committed Nov 29, 2024
1 parent 99d0e7b commit 43b787d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robyn/reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 43b787d

Please sign in to comment.