chore: remove PopenBytes & TYPE_CHECKING

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner
2025-02-28 16:38:15 -05:00
committed by Henry Schreiner
parent 783be9bc2f
commit 1b63074d76
2 changed files with 4 additions and 11 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ from typing import IO, Literal, Self, assert_never
from .ci import CIProvider, detect_ci_provider
from .errors import OCIEngineTooOldError
from .logger import log
from .typing import PathOrStr, PopenBytes
from .typing import PathOrStr
from .util.cmd import call
from .util.helpers import FlexibleVersion, parse_key_value_string, strtobool
@@ -164,7 +164,7 @@ class OCIContainer:
UTILITY_PYTHON = "/opt/python/cp39-cp39/bin/python"
process: PopenBytes
process: subprocess.Popen[bytes]
bash_stdin: IO[bytes]
bash_stdout: IO[bytes]
+2 -9
View File
@@ -1,24 +1,17 @@
from __future__ import annotations
import os
import subprocess
import typing
from typing import Final, Literal, Protocol, Union
from typing import Final, Literal, Protocol
__all__ = (
"PLATFORMS",
"PathOrStr",
"PlatformName",
"PopenBytes",
)
if typing.TYPE_CHECKING:
PopenBytes = subprocess.Popen[bytes]
PathOrStr = str | os.PathLike[str]
else:
PopenBytes = subprocess.Popen
PathOrStr = Union[str, "os.PathLike[str]"]
PathOrStr = str | os.PathLike[str]
PlatformName = Literal["linux", "macos", "windows", "pyodide"]