-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: restore typing for non-backports
Signed-off-by: Henry Schreiner <[email protected]>
- Loading branch information
Showing
10 changed files
with
51 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from __future__ import annotations | ||
|
||
import os | ||
import subprocess | ||
import typing | ||
from typing import Union | ||
|
||
from ._compat.typing import Final, Literal, Protocol | ||
|
||
__all__ = ( | ||
"PLATFORMS", | ||
"PathOrStr", | ||
"PlatformName", | ||
"PLATFORMS", | ||
"PopenBytes", | ||
) | ||
|
||
|
||
if typing.TYPE_CHECKING: | ||
PopenBytes = subprocess.Popen[bytes] | ||
PathOrStr = Union[str, os.PathLike[str]] | ||
else: | ||
PopenBytes = subprocess.Popen | ||
PathOrStr = Union[str, "os.PathLike[str]"] | ||
|
||
|
||
PlatformName = Literal["linux", "macos", "windows"] | ||
PLATFORMS: Final[set[PlatformName]] = {"linux", "macos", "windows"} | ||
|
||
|
||
class GenericPythonConfiguration(Protocol): | ||
@property | ||
def identifier(self) -> str: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters