mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-17 13:59:45 +08:00
Replace Any with Incomplete in many places (#9558)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from _typeshed import SupportsItems, SupportsRead, SupportsReadline
|
||||
from _typeshed import Incomplete, SupportsItems, SupportsRead, SupportsReadline
|
||||
from collections.abc import Callable, Collection, Generator, Iterable, Mapping
|
||||
from os import PathLike
|
||||
from typing import Any, AnyStr, Protocol, overload
|
||||
@@ -41,7 +41,7 @@ def check_and_call_extract_file(
|
||||
keywords: Mapping[str, _Keyword],
|
||||
comment_tags: Collection[str],
|
||||
strip_comment_tags,
|
||||
dirpath: Any | None = ...,
|
||||
dirpath: Incomplete | None = ...,
|
||||
) -> Generator[tuple[AnyStr, int, str | tuple[str, ...], list[str], str | None], None, None]: ...
|
||||
def extract_from_file(
|
||||
method,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import abc
|
||||
from _typeshed import Incomplete
|
||||
from distutils.cmd import Command as _Command
|
||||
from typing import Any
|
||||
|
||||
def listify_value(arg, split: Any | None = ...): ...
|
||||
def listify_value(arg, split: Incomplete | None = ...): ...
|
||||
|
||||
class Command(_Command, metaclass=abc.ABCMeta):
|
||||
as_args: Any
|
||||
@@ -16,7 +17,7 @@ class Command(_Command, metaclass=abc.ABCMeta):
|
||||
force: Any
|
||||
help: int
|
||||
finalized: int
|
||||
def __init__(self, dist: Any | None = ...) -> None: ...
|
||||
def __init__(self, dist: Incomplete | None = ...) -> None: ...
|
||||
|
||||
class compile_catalog(Command):
|
||||
description: str
|
||||
@@ -111,8 +112,8 @@ class CommandLineInterface:
|
||||
command_classes: Any
|
||||
log: Any
|
||||
parser: Any
|
||||
def run(self, argv: Any | None = ...): ...
|
||||
def run(self, argv: Incomplete | None = ...): ...
|
||||
|
||||
def main(): ...
|
||||
def parse_mapping(fileobj, filename: Any | None = ...): ...
|
||||
def parse_mapping(fileobj, filename: Incomplete | None = ...): ...
|
||||
def parse_keywords(strings=...): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import decimal
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import Any
|
||||
|
||||
@@ -25,8 +26,8 @@ def cldr_modulo(a, b): ...
|
||||
class RuleError(Exception): ...
|
||||
|
||||
def tokenize_rule(s): ...
|
||||
def test_next_token(tokens, type_, value: Any | None = ...): ...
|
||||
def skip_token(tokens, type_, value: Any | None = ...): ...
|
||||
def test_next_token(tokens, type_, value: Incomplete | None = ...): ...
|
||||
def skip_token(tokens, type_, value: Incomplete | None = ...): ...
|
||||
def value_node(value): ...
|
||||
def ident_node(name): ...
|
||||
def range_list_node(range_list): ...
|
||||
@@ -36,7 +37,7 @@ class _Parser:
|
||||
tokens: Any
|
||||
ast: Any
|
||||
def __init__(self, string) -> None: ...
|
||||
def expect(self, type_, value: Any | None = ..., term: Any | None = ...): ...
|
||||
def expect(self, type_, value: Incomplete | None = ..., term: Incomplete | None = ...): ...
|
||||
def condition(self): ...
|
||||
def and_condition(self): ...
|
||||
def relation(self): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import gettext
|
||||
from _typeshed import Incomplete
|
||||
from datetime import date as _date, datetime as _datetime, time as _time, timedelta as _timedelta
|
||||
from decimal import Decimal
|
||||
from typing import Any
|
||||
@@ -66,7 +67,7 @@ class NullTranslations(gettext.NullTranslations):
|
||||
plural: Any
|
||||
files: Any
|
||||
domain: Any
|
||||
def __init__(self, fp: Any | None = ...): ...
|
||||
def __init__(self, fp: Incomplete | None = ...): ...
|
||||
def dgettext(self, domain, message): ...
|
||||
def ldgettext(self, domain, message): ...
|
||||
def udgettext(self, domain, message): ...
|
||||
@@ -96,10 +97,10 @@ class NullTranslations(gettext.NullTranslations):
|
||||
class Translations(NullTranslations, gettext.GNUTranslations):
|
||||
DEFAULT_DOMAIN: str
|
||||
domain: Any
|
||||
def __init__(self, fp: Any | None = ..., domain: Any | None = ...) -> None: ...
|
||||
def __init__(self, fp: Incomplete | None = ..., domain: Incomplete | None = ...) -> None: ...
|
||||
ugettext: Any
|
||||
ungettext: Any
|
||||
@classmethod
|
||||
def load(cls, dirname: Any | None = ..., locales: Any | None = ..., domain: Any | None = ...): ...
|
||||
def load(cls, dirname: Incomplete | None = ..., locales: Incomplete | None = ..., domain: Incomplete | None = ...): ...
|
||||
def add(self, translations, merge: bool = ...): ...
|
||||
def merge(self, translations): ...
|
||||
|
||||
Reference in New Issue
Block a user