From 656f544a0b8d8a28bbec99c99d5580b3193ccd37 Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Mon, 21 Aug 2023 22:57:15 +0900 Subject: [PATCH 1/4] Save less information + fix failing CI --- trio/_tests/check_type_completeness.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trio/_tests/check_type_completeness.py b/trio/_tests/check_type_completeness.py index 449f18f9ab..421c13ca07 100755 --- a/trio/_tests/check_type_completeness.py +++ b/trio/_tests/check_type_completeness.py @@ -143,7 +143,8 @@ def check_type(args: argparse.Namespace, platform: str) -> int: new_symbols = [] for symbol in current_result["typeCompleteness"]["symbols"]: if symbol["diagnostics"]: - new_symbols.append(symbol) + # function name + message should be enough context for people! + new_symbols.append({"name": symbol["name"], "message": symbol["message"]}) continue # Ensure order of arrays does not affect result. From daf4c6fbd0b19482de558b3bdab607e3593a93ae Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Mon, 21 Aug 2023 14:02:09 +0000 Subject: [PATCH 2/4] Upload new and improved JSONs --- trio/_tests/check_type_completeness.py | 5 +- trio/_tests/verify_types_darwin.json | 199 ++----- trio/_tests/verify_types_linux.json | 112 +--- trio/_tests/verify_types_windows.json | 743 +++++-------------------- 4 files changed, 188 insertions(+), 871 deletions(-) diff --git a/trio/_tests/check_type_completeness.py b/trio/_tests/check_type_completeness.py index 421c13ca07..22cfc93e85 100755 --- a/trio/_tests/check_type_completeness.py +++ b/trio/_tests/check_type_completeness.py @@ -144,7 +144,7 @@ def check_type(args: argparse.Namespace, platform: str) -> int: for symbol in current_result["typeCompleteness"]["symbols"]: if symbol["diagnostics"]: # function name + message should be enough context for people! - new_symbols.append({"name": symbol["name"], "message": symbol["message"]}) + new_symbols.extend({"name": symbol["name"], "message": diagnostic["message"]} for diagnostic in symbol["diagnostics"]) continue # Ensure order of arrays does not affect result. @@ -154,7 +154,8 @@ def check_type(args: argparse.Namespace, platform: str) -> int: key=lambda module: module.get("name", "") ) - current_result["typeCompleteness"]["symbols"] = new_symbols + del current_result["typeCompleteness"]["symbols"] + current_result["typeCompleteness"]["diagnostics"] = new_symbols with open(get_result_file_name(platform), "w") as file: json.dump(current_result, file, sort_keys=True, indent=2) diff --git a/trio/_tests/verify_types_darwin.json b/trio/_tests/verify_types_darwin.json index 7329946baa..2b491521f5 100644 --- a/trio/_tests/verify_types_darwin.json +++ b/trio/_tests/verify_types_darwin.json @@ -8,6 +8,36 @@ }, "typeCompleteness": { "completenessScore": 1, + "diagnostics": [ + { + "message": "No docstring found for function \"trio.lowlevel.current_kqueue\"", + "name": "trio.lowlevel.current_kqueue" + }, + { + "message": "No docstring found for function \"trio.lowlevel.monitor_kevent\"", + "name": "trio.lowlevel.monitor_kevent" + }, + { + "message": "No docstring found for function \"trio.lowlevel.notify_closing\"", + "name": "trio.lowlevel.notify_closing" + }, + { + "message": "No docstring found for function \"trio.lowlevel.wait_kevent\"", + "name": "trio.lowlevel.wait_kevent" + }, + { + "message": "No docstring found for function \"trio.lowlevel.wait_readable\"", + "name": "trio.lowlevel.wait_readable" + }, + { + "message": "No docstring found for function \"trio.lowlevel.wait_writable\"", + "name": "trio.lowlevel.wait_writable" + }, + { + "message": "No docstring found for class \"trio.tests.TestsDeprecationWrapper\"", + "name": "trio.tests.TestsDeprecationWrapper" + } + ], "exportedSymbolCounts": { "withAmbiguousType": 0, "withKnownType": 631, @@ -49,173 +79,6 @@ "withKnownType": 682, "withUnknownType": 0 }, - "packageName": "trio", - "symbols": [ - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.current_kqueue\"", - "range": { - "end": { - "character": 44, - "line": 72 - }, - "start": { - "character": 30, - "line": 72 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.current_kqueue", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.monitor_kevent\"", - "range": { - "end": { - "character": 44, - "line": 73 - }, - "start": { - "character": 30, - "line": 73 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.monitor_kevent", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.notify_closing\"", - "range": { - "end": { - "character": 36, - "line": 33 - }, - "start": { - "character": 22, - "line": 33 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.notify_closing", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.wait_kevent\"", - "range": { - "end": { - "character": 38, - "line": 74 - }, - "start": { - "character": 27, - "line": 74 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.wait_kevent", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.wait_readable\"", - "range": { - "end": { - "character": 34, - "line": 42 - }, - "start": { - "character": 21, - "line": 42 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.wait_readable", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.wait_writable\"", - "range": { - "end": { - "character": 34, - "line": 44 - }, - "start": { - "character": 21, - "line": 44 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.wait_writable", - "referenceCount": 1 - }, - { - "category": "class", - "diagnostics": [ - { - "file": "", - "message": "No docstring found for class \"trio.tests.TestsDeprecationWrapper\"", - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.tests.TestsDeprecationWrapper", - "referenceCount": 1 - } - ] + "packageName": "trio" } } diff --git a/trio/_tests/verify_types_linux.json b/trio/_tests/verify_types_linux.json index 76d66813e5..a112e7edc9 100644 --- a/trio/_tests/verify_types_linux.json +++ b/trio/_tests/verify_types_linux.json @@ -8,6 +8,24 @@ }, "typeCompleteness": { "completenessScore": 1, + "diagnostics": [ + { + "message": "No docstring found for function \"trio.lowlevel.notify_closing\"", + "name": "trio.lowlevel.notify_closing" + }, + { + "message": "No docstring found for function \"trio.lowlevel.wait_readable\"", + "name": "trio.lowlevel.wait_readable" + }, + { + "message": "No docstring found for function \"trio.lowlevel.wait_writable\"", + "name": "trio.lowlevel.wait_writable" + }, + { + "message": "No docstring found for class \"trio.tests.TestsDeprecationWrapper\"", + "name": "trio.tests.TestsDeprecationWrapper" + } + ], "exportedSymbolCounts": { "withAmbiguousType": 0, "withKnownType": 628, @@ -49,98 +67,6 @@ "withKnownType": 682, "withUnknownType": 0 }, - "packageName": "trio", - "symbols": [ - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.notify_closing\"", - "range": { - "end": { - "character": 36, - "line": 33 - }, - "start": { - "character": 22, - "line": 33 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.notify_closing", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.wait_readable\"", - "range": { - "end": { - "character": 34, - "line": 42 - }, - "start": { - "character": 21, - "line": 42 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.wait_readable", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.wait_writable\"", - "range": { - "end": { - "character": 34, - "line": 44 - }, - "start": { - "character": 21, - "line": 44 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.wait_writable", - "referenceCount": 1 - }, - { - "category": "class", - "diagnostics": [ - { - "file": "", - "message": "No docstring found for class \"trio.tests.TestsDeprecationWrapper\"", - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.tests.TestsDeprecationWrapper", - "referenceCount": 1 - } - ] + "packageName": "trio" } } diff --git a/trio/_tests/verify_types_windows.json b/trio/_tests/verify_types_windows.json index 24ef5f355b..13c4756bd4 100644 --- a/trio/_tests/verify_types_windows.json +++ b/trio/_tests/verify_types_windows.json @@ -8,6 +8,140 @@ }, "typeCompleteness": { "completenessScore": 0.9857369255150554, + "diagnostics": [ + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.current_iocp" + }, + { + "message": "No docstring found for function \"trio.lowlevel.current_iocp\"", + "name": "trio.lowlevel.current_iocp" + }, + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.monitor_completion_key" + }, + { + "message": "No docstring found for function \"trio.lowlevel.monitor_completion_key\"", + "name": "trio.lowlevel.monitor_completion_key" + }, + { + "message": "Type annotation for parameter \"handle\" is missing", + "name": "trio.lowlevel.notify_closing" + }, + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.notify_closing" + }, + { + "message": "No docstring found for function \"trio.lowlevel.notify_closing\"", + "name": "trio.lowlevel.notify_closing" + }, + { + "message": "No docstring found for function \"trio.lowlevel.open_process\"", + "name": "trio.lowlevel.open_process" + }, + { + "message": "Type annotation for parameter \"handle\" is missing", + "name": "trio.lowlevel.readinto_overlapped" + }, + { + "message": "Type annotation for parameter \"buffer\" is missing", + "name": "trio.lowlevel.readinto_overlapped" + }, + { + "message": "Type annotation for parameter \"file_offset\" is missing", + "name": "trio.lowlevel.readinto_overlapped" + }, + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.readinto_overlapped" + }, + { + "message": "No docstring found for function \"trio.lowlevel.readinto_overlapped\"", + "name": "trio.lowlevel.readinto_overlapped" + }, + { + "message": "Type annotation for parameter \"handle\" is missing", + "name": "trio.lowlevel.register_with_iocp" + }, + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.register_with_iocp" + }, + { + "message": "No docstring found for function \"trio.lowlevel.register_with_iocp\"", + "name": "trio.lowlevel.register_with_iocp" + }, + { + "message": "Type annotation for parameter \"handle\" is missing", + "name": "trio.lowlevel.wait_overlapped" + }, + { + "message": "Type annotation for parameter \"lpOverlapped\" is missing", + "name": "trio.lowlevel.wait_overlapped" + }, + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.wait_overlapped" + }, + { + "message": "No docstring found for function \"trio.lowlevel.wait_overlapped\"", + "name": "trio.lowlevel.wait_overlapped" + }, + { + "message": "Type annotation for parameter \"sock\" is missing", + "name": "trio.lowlevel.wait_readable" + }, + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.wait_readable" + }, + { + "message": "No docstring found for function \"trio.lowlevel.wait_readable\"", + "name": "trio.lowlevel.wait_readable" + }, + { + "message": "Type annotation for parameter \"sock\" is missing", + "name": "trio.lowlevel.wait_writable" + }, + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.wait_writable" + }, + { + "message": "No docstring found for function \"trio.lowlevel.wait_writable\"", + "name": "trio.lowlevel.wait_writable" + }, + { + "message": "Type annotation for parameter \"handle\" is missing", + "name": "trio.lowlevel.write_overlapped" + }, + { + "message": "Type annotation for parameter \"data\" is missing", + "name": "trio.lowlevel.write_overlapped" + }, + { + "message": "Type annotation for parameter \"file_offset\" is missing", + "name": "trio.lowlevel.write_overlapped" + }, + { + "message": "Return type annotation is missing", + "name": "trio.lowlevel.write_overlapped" + }, + { + "message": "No docstring found for function \"trio.lowlevel.write_overlapped\"", + "name": "trio.lowlevel.write_overlapped" + }, + { + "message": "No docstring found for function \"trio.run_process\"", + "name": "trio.run_process" + }, + { + "message": "No docstring found for class \"trio.tests.TestsDeprecationWrapper\"", + "name": "trio.tests.TestsDeprecationWrapper" + } + ], "exportedSymbolCounts": { "withAmbiguousType": 0, "withKnownType": 622, @@ -49,613 +183,6 @@ "withKnownType": 673, "withUnknownType": 0 }, - "packageName": "trio", - "symbols": [ - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 36, - "line": 57 - }, - "start": { - "character": 24, - "line": 57 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.current_iocp\"", - "range": { - "end": { - "character": 36, - "line": 57 - }, - "start": { - "character": 24, - "line": 57 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.current_iocp", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 56, - "line": 58 - }, - "start": { - "character": 34, - "line": 58 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.monitor_completion_key\"", - "range": { - "end": { - "character": 56, - "line": 58 - }, - "start": { - "character": 34, - "line": 58 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.monitor_completion_key", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"handle\" is missing", - "range": { - "end": { - "character": 36, - "line": 33 - }, - "start": { - "character": 22, - "line": 33 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 36, - "line": 33 - }, - "start": { - "character": 22, - "line": 33 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.notify_closing\"", - "range": { - "end": { - "character": 36, - "line": 33 - }, - "start": { - "character": 22, - "line": 33 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.notify_closing", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_subprocess.py", - "message": "No docstring found for function \"trio.lowlevel.open_process\"", - "range": { - "end": { - "character": 53, - "line": 46 - }, - "start": { - "character": 41, - "line": 46 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.lowlevel.open_process", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"handle\" is missing", - "range": { - "end": { - "character": 50, - "line": 59 - }, - "start": { - "character": 31, - "line": 59 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"buffer\" is missing", - "range": { - "end": { - "character": 50, - "line": 59 - }, - "start": { - "character": 31, - "line": 59 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"file_offset\" is missing", - "range": { - "end": { - "character": 50, - "line": 59 - }, - "start": { - "character": 31, - "line": 59 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 50, - "line": 59 - }, - "start": { - "character": 31, - "line": 59 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.readinto_overlapped\"", - "range": { - "end": { - "character": 50, - "line": 59 - }, - "start": { - "character": 31, - "line": 59 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.readinto_overlapped", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"handle\" is missing", - "range": { - "end": { - "character": 48, - "line": 60 - }, - "start": { - "character": 30, - "line": 60 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 48, - "line": 60 - }, - "start": { - "character": 30, - "line": 60 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.register_with_iocp\"", - "range": { - "end": { - "character": 48, - "line": 60 - }, - "start": { - "character": 30, - "line": 60 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.register_with_iocp", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"handle\" is missing", - "range": { - "end": { - "character": 42, - "line": 61 - }, - "start": { - "character": 27, - "line": 61 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"lpOverlapped\" is missing", - "range": { - "end": { - "character": 42, - "line": 61 - }, - "start": { - "character": 27, - "line": 61 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 42, - "line": 61 - }, - "start": { - "character": 27, - "line": 61 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.wait_overlapped\"", - "range": { - "end": { - "character": 42, - "line": 61 - }, - "start": { - "character": 27, - "line": 61 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.wait_overlapped", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"sock\" is missing", - "range": { - "end": { - "character": 34, - "line": 42 - }, - "start": { - "character": 21, - "line": 42 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 34, - "line": 42 - }, - "start": { - "character": 21, - "line": 42 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.wait_readable\"", - "range": { - "end": { - "character": 34, - "line": 42 - }, - "start": { - "character": 21, - "line": 42 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.wait_readable", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"sock\" is missing", - "range": { - "end": { - "character": 34, - "line": 44 - }, - "start": { - "character": 21, - "line": 44 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 34, - "line": 44 - }, - "start": { - "character": 21, - "line": 44 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.wait_writable\"", - "range": { - "end": { - "character": 34, - "line": 44 - }, - "start": { - "character": 21, - "line": 44 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.wait_writable", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"handle\" is missing", - "range": { - "end": { - "character": 44, - "line": 62 - }, - "start": { - "character": 28, - "line": 62 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"data\" is missing", - "range": { - "end": { - "character": 44, - "line": 62 - }, - "start": { - "character": 28, - "line": 62 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Type annotation for parameter \"file_offset\" is missing", - "range": { - "end": { - "character": 44, - "line": 62 - }, - "start": { - "character": 28, - "line": 62 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "Return type annotation is missing", - "range": { - "end": { - "character": 44, - "line": 62 - }, - "start": { - "character": 28, - "line": 62 - } - }, - "severity": "error" - }, - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_core/__init__.py", - "message": "No docstring found for function \"trio.lowlevel.write_overlapped\"", - "range": { - "end": { - "character": 44, - "line": 62 - }, - "start": { - "character": 28, - "line": 62 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": false, - "name": "trio.lowlevel.write_overlapped", - "referenceCount": 1 - }, - { - "category": "function", - "diagnostics": [ - { - "file": "/home/h/Git/trio/typing_improvements/.tox/verifytypes/lib/python3.8/site-packages/trio/_subprocess.py", - "message": "No docstring found for function \"trio.run_process\"", - "range": { - "end": { - "character": 71, - "line": 83 - }, - "start": { - "character": 60, - "line": 83 - } - }, - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.run_process", - "referenceCount": 1 - }, - { - "category": "class", - "diagnostics": [ - { - "file": "", - "message": "No docstring found for class \"trio.tests.TestsDeprecationWrapper\"", - "severity": "warning" - } - ], - "isExported": true, - "isTypeAmbiguous": false, - "isTypeKnown": true, - "name": "trio.tests.TestsDeprecationWrapper", - "referenceCount": 1 - } - ] + "packageName": "trio" } } From 245acac84f7de9a57de2261e42701a9fd31192b2 Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Mon, 21 Aug 2023 14:08:37 +0000 Subject: [PATCH 3/4] Formatting... --- trio/_tests/check_type_completeness.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trio/_tests/check_type_completeness.py b/trio/_tests/check_type_completeness.py index 22cfc93e85..809690e57a 100755 --- a/trio/_tests/check_type_completeness.py +++ b/trio/_tests/check_type_completeness.py @@ -144,7 +144,10 @@ def check_type(args: argparse.Namespace, platform: str) -> int: for symbol in current_result["typeCompleteness"]["symbols"]: if symbol["diagnostics"]: # function name + message should be enough context for people! - new_symbols.extend({"name": symbol["name"], "message": diagnostic["message"]} for diagnostic in symbol["diagnostics"]) + new_symbols.extend( + {"name": symbol["name"], "message": diagnostic["message"]} + for diagnostic in symbol["diagnostics"] + ) continue # Ensure order of arrays does not affect result. From 85c61ebe8fe78f054154e756092ae01ea75836ee Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Tue, 22 Aug 2023 06:49:10 +0900 Subject: [PATCH 4/4] Fix mypy error --- trio/_tests/check_type_completeness.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trio/_tests/check_type_completeness.py b/trio/_tests/check_type_completeness.py index 809690e57a..00d519c8a8 100755 --- a/trio/_tests/check_type_completeness.py +++ b/trio/_tests/check_type_completeness.py @@ -140,7 +140,7 @@ def check_type(args: argparse.Namespace, platform: str) -> int: # prune the symbols to only be the name of the symbols with # errors, instead of saving a huge file. - new_symbols = [] + new_symbols: list[dict[str, str]] = [] for symbol in current_result["typeCompleteness"]["symbols"]: if symbol["diagnostics"]: # function name + message should be enough context for people!