Skip to content

Commit a3c8fce

Browse files
donbarbosAvasam
andauthored
Add __all__ part 2 (#13719)
--------- Co-authored-by: Avasam <samuel.06@hotmail.com>
1 parent 0104531 commit a3c8fce

File tree

132 files changed

+1057
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+1057
-171
lines changed

stubs/WTForms/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# TODO: missing from stub
2-
wtforms.form.__all__
3-
41
# Error: is not present at runtime
52
# =============================
63
# This is hack to get around Field.__new__ not being able to return

stubs/WTForms/wtforms/form.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,5 @@ class Form(BaseForm, metaclass=FormMeta):
8383
def __setitem__(self, name: str, value: None) -> None: ... # type: ignore[override]
8484
def __delitem__(self, name: str) -> None: ...
8585
def __delattr__(self, name: str) -> None: ...
86+
87+
__all__ = ("BaseForm", "Form")
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
# TODO: missing from stub
2-
editdistance.__all__
3-
41
# Not public API -- the submodule is an implementation detail due to it being a cythonized package
52
editdistance.bycython

stubs/editdistance/editdistance/__init__.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ def eval(a: Iterable[Hashable], b: Iterable[Hashable]) -> int: ...
44
def distance(a: Iterable[Hashable], b: Iterable[Hashable]) -> int: ...
55
def eval_criterion(a: Iterable[Hashable], b: Iterable[Hashable], thr: int) -> bool: ...
66
def distance_le_than(a: Iterable[Hashable], b: Iterable[Hashable], thr: int) -> bool: ...
7+
8+
__all__ = ("eval", "distance", "eval_criterion", "distance_le_than")

stubs/gevent/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,8 @@
11
# TODO: missing from stub
2-
gevent._abstract_linkable.__all__
3-
gevent._ffi.loop.__all__
4-
gevent._ffi.watcher.__all__
5-
gevent._greenlet_primitives.__all__
6-
gevent._ident.__all__
7-
gevent._imap.__all__
8-
gevent.backdoor.__all__
9-
gevent.baseserver.__all__
10-
gevent.event.__all__
11-
gevent.events.__all__
12-
gevent.exceptions.__all__
13-
gevent.fileobject.__all__
14-
gevent.greenlet.__all__
15-
gevent.hub.__all__
16-
gevent.libev.__all__
17-
gevent.libev.corecext.__all__
18-
gevent.libuv.__all__
19-
gevent.libuv.loop.__all__
20-
gevent.libuv.watcher.__all__
21-
gevent.local.__all__
22-
gevent.monkey.__all__
232
gevent.os.__all__
24-
gevent.resolver.__all__
25-
gevent.resolver.blocking.__all__
26-
gevent.resolver.dnspython.__all__
27-
gevent.resolver.thread.__all__
28-
gevent.resolver_thread.__all__
29-
gevent.server.__all__
30-
gevent.signal.__all__
313
gevent.socket.__all__
324
gevent.ssl.__all__
335
gevent.subprocess.__all__
34-
gevent.threadpool.__all__
35-
gevent.timeout.__all__
36-
gevent.util.__all__
37-
gevent.win32util.__all__
386

397
# Error: failed to find stubs
408
# =============================
@@ -66,7 +34,6 @@ gevent._ffi.ERROR
6634
gevent._ffi.GEVENT_DEBUG_LEVEL
6735
gevent._ffi.TRACE
6836
gevent._ffi.loop.AbstractLoop.async
69-
gevent._ffi.loop.assign_standard_callbacks
7037
gevent._fileobjectcommon.UniversalNewlineBytesWrapper
7138
gevent._waiter.Waiter.switch_args
7239

@@ -79,8 +46,6 @@ gevent.libuv.watcher.watcher.feed
7946
# unnecessary python 2 compatibility stuff
8047
gevent._config.Config.trace_malloc
8148
gevent._imap.IMapUnordered.next
82-
gevent.monkey.patch_builtins
83-
gevent.monkey.patch_sys
8449
gevent.pywsgi.Environ.iteritems
8550

8651
# weird method that doesn't work with this being generic, so we removed it

stubs/gevent/@tests/stubtest_allowlist_darwin.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# TODO: missing from stub
2-
gevent.ares.__all__
3-
gevent.libev.corecffi.__all__
4-
gevent.resolver.ares.__all__
5-
gevent.resolver_ares.__all__
6-
71
# Error: is not present in stub
82
# =============================
93
# internal API stuff we dropped because it wasn't necessary

stubs/gevent/@tests/stubtest_allowlist_linux.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# TODO: missing from stub
2-
gevent.ares.__all__
3-
gevent.libev.corecffi.__all__
4-
gevent.resolver.ares.__all__
5-
gevent.resolver_ares.__all__
6-
71
# Error: is not present in stub
82
# =============================
93
# internal API stuff we dropped because it wasn't necessary

stubs/gevent/@tests/stubtest_allowlist_win32.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Error: is not present in stub
22
# =============================
33
# these get exported but don't actually work on win32 so we ignore them
4+
gevent.signal.__all__
45
gevent.signal.getsignal
56
gevent.signal.signal
67

stubs/gevent/gevent/_abstract_linkable.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ class AbstractLinkable:
1111
def rawlink(self, callback: Callable[[Self], object], /) -> None: ...
1212
def ready(self) -> bool: ...
1313
def unlink(self, callback: Callable[[Self], object], /) -> None: ...
14+
15+
__all__ = ["AbstractLinkable"]

stubs/gevent/gevent/_ffi/loop.pyi

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from _typeshed import FileDescriptor
3-
from collections.abc import Callable
3+
from collections.abc import Callable, Sequence
44
from types import TracebackType
55
from typing import Protocol
66
from typing_extensions import TypeAlias, TypeVarTuple, Unpack
@@ -17,6 +17,10 @@ class _SupportsHandleError(Protocol):
1717

1818
_ErrorHandler: TypeAlias = _ErrorHandlerFunc | _SupportsHandleError
1919

20+
def assign_standard_callbacks(
21+
ffi: object, lib: object, callbacks_class: Callable[[object], object], extras: Sequence[tuple[object, object]] = ...
22+
) -> object: ...
23+
2024
class AbstractLoop:
2125
CALLBACK_CHECK_COUNT: int
2226
error_handler: _ErrorHandler | None
@@ -78,3 +82,5 @@ class AbstractLoop:
7882
def run_callback_threadsafe(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> _Callback: ...
7983
def callback(self, priority: float | None = ...) -> _Callback: ...
8084
def fileno(self) -> FileDescriptor | None: ...
85+
86+
__all__ = ["AbstractLoop", "assign_standard_callbacks"]

0 commit comments

Comments
 (0)