mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-25 04:16:44 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import StrOrBytesPath
|
||||
from types import SimpleNamespace
|
||||
from typing import Optional, Sequence
|
||||
from typing import Sequence
|
||||
|
||||
class EnvBuilder:
|
||||
system_site_packages: bool
|
||||
@@ -9,7 +9,7 @@ class EnvBuilder:
|
||||
symlinks: bool
|
||||
upgrade: bool
|
||||
with_pip: bool
|
||||
prompt: Optional[str]
|
||||
prompt: str | None
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def __init__(
|
||||
@@ -19,7 +19,7 @@ class EnvBuilder:
|
||||
symlinks: bool = ...,
|
||||
upgrade: bool = ...,
|
||||
with_pip: bool = ...,
|
||||
prompt: Optional[str] = ...,
|
||||
prompt: str | None = ...,
|
||||
upgrade_deps: bool = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
@@ -30,7 +30,7 @@ class EnvBuilder:
|
||||
symlinks: bool = ...,
|
||||
upgrade: bool = ...,
|
||||
with_pip: bool = ...,
|
||||
prompt: Optional[str] = ...,
|
||||
prompt: str | None = ...,
|
||||
) -> None: ...
|
||||
def create(self, env_dir: StrOrBytesPath) -> None: ...
|
||||
def clear_directory(self, path: StrOrBytesPath) -> None: ... # undocumented
|
||||
@@ -55,7 +55,7 @@ if sys.version_info >= (3, 9):
|
||||
clear: bool = ...,
|
||||
symlinks: bool = ...,
|
||||
with_pip: bool = ...,
|
||||
prompt: Optional[str] = ...,
|
||||
prompt: str | None = ...,
|
||||
upgrade_deps: bool = ...,
|
||||
) -> None: ...
|
||||
|
||||
@@ -66,7 +66,7 @@ else:
|
||||
clear: bool = ...,
|
||||
symlinks: bool = ...,
|
||||
with_pip: bool = ...,
|
||||
prompt: Optional[str] = ...,
|
||||
prompt: str | None = ...,
|
||||
) -> None: ...
|
||||
|
||||
def main(args: Optional[Sequence[str]] = ...) -> None: ...
|
||||
def main(args: Sequence[str] | None = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user