* fix: enable and fix fully type checking * chore: pre-commit autoupdate * refactor: pull types out to file
12 lines
261 B
Python
12 lines
261 B
Python
from typing import Union, TYPE_CHECKING
|
|
import os
|
|
import subprocess
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
PopenBytes = subprocess.Popen[bytes]
|
|
PathOrStr = Union[str, os.PathLike[str]]
|
|
else:
|
|
PopenBytes = subprocess.Popen
|
|
PathOrStr = Union[str, "os.PathLike[str]"]
|