Skip to content

Commit dc9f9db

Browse files
srittauJelleZijlstra
authored andcommitted
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
1 parent cc45366 commit dc9f9db

File tree

8 files changed

+6
-13
lines changed

8 files changed

+6
-13
lines changed

third_party/2and3/markupsafe/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Markup(text_type):
2525
def escape(cls, s: text_type) -> Markup: ...
2626
def partition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
2727
def rpartition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
28-
def format(*args, **kwargs) -> Markup: ...
28+
def format(self, *args, **kwargs) -> Markup: ...
2929
def __html_format__(self, format_spec) -> Markup: ...
3030
def __getslice__(self, start: int, stop: int) -> Markup: ...
3131
def __getitem__(self, i: Union[int, slice]) -> Markup: ...

third_party/2and3/requests/packages/urllib3/_collections.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class HTTPHeaderDict(dict):
3434
def pop(self, key, default=...): ...
3535
def discard(self, key): ...
3636
def add(self, key, val): ...
37-
def extend(*args, **kwargs): ...
37+
def extend(self, *args, **kwargs): ...
3838
def getlist(self, key): ...
3939
getheaders = ... # type: Any
4040
getallmatchingheaders = ... # type: Any

third_party/2and3/werkzeug/datastructures.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class ImmutableMultiDictMixin(ImmutableDictMixin):
4747

4848
class UpdateDictMixin:
4949
on_update = ... # type: Any
50-
def calls_update(name): ...
5150
def setdefault(self, key, default=None): ...
5251
def pop(self, key, default=...): ...
5352
__setitem__ = ... # type: Any

third_party/2and3/werkzeug/test.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ class EnvironBuilder:
4949
content_length = ... # type: Any
5050
closed = ... # type: Any
5151
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=''): ...
52-
def form_property(name, storage, doc): ...
5352
form = ... # type: Any
5453
files = ... # type: Any
5554
@property

third_party/3/docutils/__init__.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
...
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
...
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
...

third_party/3/pkg_resources.pyi

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,13 @@ class Distribution(IResourceProvider, IMetadataProvider):
168168
def clone(self, **kw: Union[str, int, None]) -> Requirement: ...
169169
def egg_name(self) -> str: ...
170170
def __cmp__(self, other: Any) -> bool: ...
171-
def get_entry_info(dist: _EPDistType, group: str,
171+
def get_entry_info(self, group: str,
172172
name: str) -> Optional[EntryPoint]: ...
173173
@overload
174-
def get_entry_map(dist: _EPDistType) \
175-
-> Dict[str, Dict[str, EntryPoint]]: ...
174+
def get_entry_map(self) -> Dict[str, Dict[str, EntryPoint]]: ...
176175
@overload
177-
def get_entry_map(dist: _EPDistType, group: str) \
178-
-> Dict[str, EntryPoint]: ...
179-
def load_entry_point(dist: _EPDistType, group: str, name: str) -> None: ...
176+
def get_entry_map(self, group: str) -> Dict[str, EntryPoint]: ...
177+
def load_entry_point(self, group: str, name: str) -> None: ...
180178

181179
EGG_DIST = ... # type: int
182180
BINARY_DIST = ... # type: int

0 commit comments

Comments
 (0)