mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-18 01:45:59 +08:00
Assorted thirdparty fixes (#2332)
* pkg_resources.Distribution: Fix self arguments * docutils: Remove spurious ellipses * Add self argument to markupsafe.Markup.format() While the actual signature is also "def format(*args, **kwargs)", the implementation extracts "self" from "args" as first step. * werkzeug: Remove methods not present during runtime UpdateDictMixin.calls_update() and EnvironBuilder.form_property() get deleted while constructing the respective class. * requests: Add missing self argument
This commit is contained in:
committed by
Jelle Zijlstra
parent
cc45366ca5
commit
dc9f9db77f
2
third_party/2and3/markupsafe/__init__.pyi
vendored
2
third_party/2and3/markupsafe/__init__.pyi
vendored
@@ -25,7 +25,7 @@ class Markup(text_type):
|
||||
def escape(cls, s: text_type) -> Markup: ...
|
||||
def partition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
|
||||
def rpartition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
|
||||
def format(*args, **kwargs) -> Markup: ...
|
||||
def format(self, *args, **kwargs) -> Markup: ...
|
||||
def __html_format__(self, format_spec) -> Markup: ...
|
||||
def __getslice__(self, start: int, stop: int) -> Markup: ...
|
||||
def __getitem__(self, i: Union[int, slice]) -> Markup: ...
|
||||
|
||||
@@ -34,7 +34,7 @@ class HTTPHeaderDict(dict):
|
||||
def pop(self, key, default=...): ...
|
||||
def discard(self, key): ...
|
||||
def add(self, key, val): ...
|
||||
def extend(*args, **kwargs): ...
|
||||
def extend(self, *args, **kwargs): ...
|
||||
def getlist(self, key): ...
|
||||
getheaders = ... # type: Any
|
||||
getallmatchingheaders = ... # type: Any
|
||||
|
||||
@@ -47,7 +47,6 @@ class ImmutableMultiDictMixin(ImmutableDictMixin):
|
||||
|
||||
class UpdateDictMixin:
|
||||
on_update = ... # type: Any
|
||||
def calls_update(name): ...
|
||||
def setdefault(self, key, default=None): ...
|
||||
def pop(self, key, default=...): ...
|
||||
__setitem__ = ... # type: Any
|
||||
|
||||
1
third_party/2and3/werkzeug/test.pyi
vendored
1
third_party/2and3/werkzeug/test.pyi
vendored
@@ -49,7 +49,6 @@ class EnvironBuilder:
|
||||
content_length = ... # type: Any
|
||||
closed = ... # type: Any
|
||||
def __init__(self, path='', base_url=None, query_string=None, method='', input_stream=None, content_type=None, content_length=None, errors_stream=None, multithread=False, multiprocess=False, run_once=False, headers=None, data=None, environ_base=None, environ_overrides=None, charset=''): ...
|
||||
def form_property(name, storage, doc): ...
|
||||
form = ... # type: Any
|
||||
files = ... # type: Any
|
||||
@property
|
||||
|
||||
1
third_party/3/docutils/__init__.pyi
vendored
1
third_party/3/docutils/__init__.pyi
vendored
@@ -1 +0,0 @@
|
||||
...
|
||||
|
||||
1
third_party/3/docutils/parsers/__init__.pyi
vendored
1
third_party/3/docutils/parsers/__init__.pyi
vendored
@@ -1 +0,0 @@
|
||||
...
|
||||
|
||||
1
third_party/3/docutils/parsers/rst/nodes.pyi
vendored
1
third_party/3/docutils/parsers/rst/nodes.pyi
vendored
@@ -1 +0,0 @@
|
||||
...
|
||||
|
||||
10
third_party/3/pkg_resources.pyi
vendored
10
third_party/3/pkg_resources.pyi
vendored
@@ -168,15 +168,13 @@ class Distribution(IResourceProvider, IMetadataProvider):
|
||||
def clone(self, **kw: Union[str, int, None]) -> Requirement: ...
|
||||
def egg_name(self) -> str: ...
|
||||
def __cmp__(self, other: Any) -> bool: ...
|
||||
def get_entry_info(dist: _EPDistType, group: str,
|
||||
def get_entry_info(self, group: str,
|
||||
name: str) -> Optional[EntryPoint]: ...
|
||||
@overload
|
||||
def get_entry_map(dist: _EPDistType) \
|
||||
-> Dict[str, Dict[str, EntryPoint]]: ...
|
||||
def get_entry_map(self) -> Dict[str, Dict[str, EntryPoint]]: ...
|
||||
@overload
|
||||
def get_entry_map(dist: _EPDistType, group: str) \
|
||||
-> Dict[str, EntryPoint]: ...
|
||||
def load_entry_point(dist: _EPDistType, group: str, name: str) -> None: ...
|
||||
def get_entry_map(self, group: str) -> Dict[str, EntryPoint]: ...
|
||||
def load_entry_point(self, group: str, name: str) -> None: ...
|
||||
|
||||
EGG_DIST = ... # type: int
|
||||
BINARY_DIST = ... # type: int
|
||||
|
||||
Reference in New Issue
Block a user