Delete duplicate union members (#6916)

This commit is contained in:
Akuli authored and GitHub committed 2022-01-14 17:41:06 +02:00
1 parent cfcabfd33d
commit f9c650d167
2 files changed
+7 -8

No files matched your search

+2 -2
View File
@@ -292,7 +292,7 @@ class Action(_AttributeHolder):
nargs: int | str | None = ...,
const: _T | None = ...,
default: _T | str | None = ...,
type: Callable[[str], _T] | Callable[[str], _T] | FileType | None = ...,
type: Callable[[str], _T] | FileType | None = ...,
choices: Iterable[_T] | None = ...,
required: bool = ...,
help: str | None = ...,
@@ -311,7 +311,7 @@ if sys.version_info >= (3, 9):
option_strings: Sequence[str],
dest: str,
default: _T | str | None = ...,
type: Callable[[str], _T] | Callable[[str], _T] | FileType | None = ...,
type: Callable[[str], _T] | FileType | None = ...,
choices: Iterable[_T] | None = ...,
required: bool = ...,
help: str | None = ...,
+5 -6
View File
@@ -1,11 +1,10 @@
import sys
from typing import Any, AnyStr, Callable, Generic, Iterable, Iterator, NamedTuple, Sequence, TypeVar, Union, overload
from typing import Any, AnyStr, Callable, Generic, Iterable, Iterator, NamedTuple, Sequence, TypeVar, overload
if sys.version_info >= (3, 9):
from types import GenericAlias
_T = TypeVar("_T")
_JunkCallback = Union[Callable[[str], bool], Callable[[str], bool]]
class Match(NamedTuple):
a: int
@@ -41,7 +40,7 @@ def get_close_matches(
) -> list[Sequence[_T]]: ...
class Differ:
def __init__(self, linejunk: _JunkCallback | None = ..., charjunk: _JunkCallback | None = ...) -> None: ...
def __init__(self, linejunk: Callable[[str], bool] | None = ..., charjunk: Callable[[str], bool] | None = ...) -> None: ...
def compare(self, a: Sequence[str], b: Sequence[str]) -> Iterator[str]: ...
def IS_LINE_JUNK(line: str, pat: Any = ...) -> bool: ... # pat is undocumented
@@ -67,7 +66,7 @@ def context_diff(
lineterm: str = ...,
) -> Iterator[str]: ...
def ndiff(
a: Sequence[str], b: Sequence[str], linejunk: _JunkCallback | None = ..., charjunk: _JunkCallback | None = ...
a: Sequence[str], b: Sequence[str], linejunk: Callable[[str], bool] | None = ..., charjunk: Callable[[str], bool] | None = ...
) -> Iterator[str]: ...
class HtmlDiff:
@@ -75,8 +74,8 @@ class HtmlDiff:
self,
tabsize: int = ...,
wrapcolumn: int | None = ...,
linejunk: _JunkCallback | None = ...,
charjunk: _JunkCallback | None = ...,
linejunk: Callable[[str], bool] | None = ...,
charjunk: Callable[[str], bool] | None = ...,
) -> None: ...
def make_file(
self,