Skip to content

Commit 0480602

Browse files
authored
Merge pull request #3517 from CheViana/fix/issue-3226-typing-completeness
Fix/issue 3226 typing completeness
2 parents 50b9825 + 2a43a1f commit 0480602

2 files changed

Lines changed: 4 additions & 22 deletions

File tree

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,24 @@
11
{
22
"Darwin": [
3-
"No docstring found for function \"trio._unix_pipes.FdStream.send_all\"",
4-
"No docstring found for function \"trio._unix_pipes.FdStream.wait_send_all_might_not_block\"",
5-
"No docstring found for function \"trio._unix_pipes.FdStream.receive_some\"",
63
"No docstring found for function \"trio._unix_pipes.FdStream.close\"",
7-
"No docstring found for function \"trio._unix_pipes.FdStream.aclose\"",
84
"No docstring found for function \"trio._unix_pipes.FdStream.fileno\""
95
],
106
"Linux": [
117
"No docstring found for class \"trio._core._io_epoll._EpollStatistics\"",
12-
"No docstring found for function \"trio._unix_pipes.FdStream.send_all\"",
13-
"No docstring found for function \"trio._unix_pipes.FdStream.wait_send_all_might_not_block\"",
14-
"No docstring found for function \"trio._unix_pipes.FdStream.receive_some\"",
158
"No docstring found for function \"trio._unix_pipes.FdStream.close\"",
16-
"No docstring found for function \"trio._unix_pipes.FdStream.aclose\"",
179
"No docstring found for function \"trio._unix_pipes.FdStream.fileno\""
1810
],
1911
"Windows": [],
2012
"all": [
2113
"No docstring found for class \"trio._core._run.Task\"",
2214
"No docstring found for class \"trio._socket.SocketType\"",
23-
"No docstring found for function \"trio._highlevel_socket.SocketStream.send_all\"",
24-
"No docstring found for function \"trio._highlevel_socket.SocketStream.wait_send_all_might_not_block\"",
25-
"No docstring found for function \"trio._highlevel_socket.SocketStream.send_eof\"",
26-
"No docstring found for function \"trio._highlevel_socket.SocketStream.receive_some\"",
27-
"No docstring found for function \"trio._highlevel_socket.SocketStream.aclose\"",
2815
"No docstring found for function \"trio._subprocess.HasFileno.fileno\"",
2916
"No docstring found for class \"trio._sync.AsyncContextManagerMixin\"",
3017
"No docstring found for function \"trio._sync._HasAcquireRelease.acquire\"",
3118
"No docstring found for function \"trio._sync._HasAcquireRelease.release\"",
3219
"No docstring found for class \"trio._sync._LockImpl\"",
3320
"No docstring found for class \"trio._core._local._NoValue\"",
34-
"No docstring found for class \"trio._core._local.RunVarToken\"",
35-
"No docstring found for class \"trio.lowlevel.RunVarToken\"",
3621
"No docstring found for class \"trio.lowlevel.Task\"",
37-
"No docstring found for class \"trio.socket.SocketType\"",
38-
"No docstring found for class \"trio.socket.gaierror\"",
39-
"No docstring found for class \"trio.socket.herror\"",
40-
"No docstring found for function \"trio._core._mock_clock.MockClock.start_clock\"",
41-
"No docstring found for function \"trio._core._mock_clock.MockClock.current_time\"",
42-
"No docstring found for function \"trio._core._mock_clock.MockClock.deadline_to_sleep_time\""
22+
"No docstring found for class \"trio.socket.SocketType\""
4323
]
4424
}

‎src/trio/_tests/check_type_completeness.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# this file is not run as part of the tests, instead it's run standalone from check.sh
1414
import argparse
15+
import inspect
1516
import json
1617
import subprocess
1718
import sys
@@ -108,7 +109,8 @@ def has_docstring_at_runtime(name: str) -> bool:
108109
file=sys.stderr,
109110
)
110111
return False
111-
return bool(obj.__doc__)
112+
doc = inspect.getdoc(obj)
113+
return bool(doc)
112114

113115

114116
def check_type(

0 commit comments

Comments
 (0)