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 .ci import CIProvider, detect_ci_provider
from .errors import OCIEngineTooOldError from .errors import OCIEngineTooOldError
from .logger import log from .logger import log
from .typing import PathOrStr, PopenBytes from .typing import PathOrStr
from .util.cmd import call from .util.cmd import call
from .util.helpers import FlexibleVersion, parse_key_value_string, strtobool from .util.helpers import FlexibleVersion, parse_key_value_string, strtobool
@@ -164,7 +164,7 @@ class OCIContainer:
UTILITY_PYTHON = "/opt/python/cp39-cp39/bin/python" UTILITY_PYTHON = "/opt/python/cp39-cp39/bin/python"
process: PopenBytes process: subprocess.Popen[bytes]
bash_stdin: IO[bytes] bash_stdin: IO[bytes]
bash_stdout: IO[bytes] bash_stdout: IO[bytes]
+2 -9
View File
@@ -1,24 +1,17 @@
from __future__ import annotations from __future__ import annotations
import os import os
import subprocess
import typing import typing
from typing import Final, Literal, Protocol, Union from typing import Final, Literal, Protocol
__all__ = ( __all__ = (
"PLATFORMS", "PLATFORMS",
"PathOrStr", "PathOrStr",
"PlatformName", "PlatformName",
"PopenBytes",
) )
if typing.TYPE_CHECKING: PathOrStr = str | os.PathLike[str]
PopenBytes = subprocess.Popen[bytes]
PathOrStr = str | os.PathLike[str]
else:
PopenBytes = subprocess.Popen
PathOrStr = Union[str, "os.PathLike[str]"]
PlatformName = Literal["linux", "macos", "windows", "pyodide"] PlatformName = Literal["linux", "macos", "windows", "pyodide"]