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:
Sebastian Rittau
2018-07-14 04:23:23 +02:00
committed by Jelle Zijlstra
parent cc45366ca5
commit dc9f9db77f
8 changed files with 6 additions and 13 deletions

View File

@@ -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: ...

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1 +0,0 @@
...

View File

@@ -1 +0,0 @@
...

View File

@@ -1 +0,0 @@
...

View File

@@ -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