Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,26 +1,26 @@
from _typeshed import StrOrBytesPath, SupportsWrite
from distutils.cmd import Command
from typing import IO, Any, Dict, Iterable, List, Mapping, Optional, Tuple, Type, Union
from typing import IO, Any, Dict, Iterable, List, Mapping, Tuple, Type
class DistributionMetadata:
def __init__(self, path: Optional[Union[int, StrOrBytesPath]] = ...) -> None: ...
name: Optional[str]
version: Optional[str]
author: Optional[str]
author_email: Optional[str]
maintainer: Optional[str]
maintainer_email: Optional[str]
url: Optional[str]
license: Optional[str]
description: Optional[str]
long_description: Optional[str]
keywords: Optional[Union[str, List[str]]]
platforms: Optional[Union[str, List[str]]]
classifiers: Optional[Union[str, List[str]]]
download_url: Optional[str]
provides: Optional[List[str]]
requires: Optional[List[str]]
obsoletes: Optional[List[str]]
def __init__(self, path: int | StrOrBytesPath | None = ...) -> None: ...
name: str | None
version: str | None
author: str | None
author_email: str | None
maintainer: str | None
maintainer_email: str | None
url: str | None
license: str | None
description: str | None
long_description: str | None
keywords: str | List[str] | None
platforms: str | List[str] | None
classifiers: str | List[str] | None
download_url: str | None
provides: List[str] | None
requires: List[str] | None
obsoletes: List[str] | None
def read_pkg_file(self, file: IO[str]) -> None: ...
def write_pkg_info(self, base_dir: str) -> None: ...
def write_pkg_file(self, file: SupportsWrite[str]) -> None: ...
@@ -38,9 +38,9 @@ class DistributionMetadata:
def get_licence(self) -> str: ...
def get_description(self) -> str: ...
def get_long_description(self) -> str: ...
def get_keywords(self) -> Union[str, List[str]]: ...
def get_platforms(self) -> Union[str, List[str]]: ...
def get_classifiers(self) -> Union[str, List[str]]: ...
def get_keywords(self) -> str | List[str]: ...
def get_platforms(self) -> str | List[str]: ...
def get_classifiers(self) -> str | List[str]: ...
def get_download_url(self) -> str: ...
def get_requires(self) -> List[str]: ...
def set_requires(self, value: Iterable[str]) -> None: ...
@@ -52,7 +52,7 @@ class DistributionMetadata:
class Distribution:
cmdclass: Dict[str, Type[Command]]
metadata: DistributionMetadata
def __init__(self, attrs: Optional[Mapping[str, Any]] = ...) -> None: ...
def __init__(self, attrs: Mapping[str, Any] | None = ...) -> None: ...
def get_option_dict(self, command: str) -> Dict[str, Tuple[str, str]]: ...
def parse_config_files(self, filenames: Optional[Iterable[str]] = ...) -> None: ...
def get_command_obj(self, command: str, create: bool = ...) -> Optional[Command]: ...
def parse_config_files(self, filenames: Iterable[str] | None = ...) -> None: ...
def get_command_obj(self, command: str, create: bool = ...) -> Command | None: ...