Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug that leads to a false negative when using a TypeVar with a … #9122

Closed
wants to merge 1 commit into from

Conversation

erictraut
Copy link
Collaborator

…default prior to another TypeVar without a default in a type alias defined with .... This addresses #9120.

…default prior to another TypeVar without a default in a type alias defined with `...`. This addresses #9120.
Copy link
Contributor

github-actions bot commented Oct 1, 2024

Diff from mypy_primer, showing the effect of this PR on open source code:

pytest (https://github.com/pytest-dev/pytest)
-   /tmp/mypy_primer/projects/pytest/src/_pytest/doctest.py:421:11 - error: Type "None" is not assignable to declared type "property"
+   /tmp/mypy_primer/projects/pytest/src/_pytest/doctest.py:421:11 - error: Type "obj" is not assignable to declared type "property"

psycopg (https://github.com/psycopg/psycopg)
-   /tmp/mypy_primer/projects/psycopg/docs/lib/libpq_docs.py:129:30 - error: Cannot access attribute "doctreedir" for class "None"
+   /tmp/mypy_primer/projects/psycopg/docs/lib/libpq_docs.py:129:30 - error: Cannot access attribute "doctreedir" for class "app"
-   /tmp/mypy_primer/projects/psycopg/docs/lib/libpq_docs.py:143:25 - error: Cannot access attribute "config" for class "None"
+   /tmp/mypy_primer/projects/psycopg/docs/lib/libpq_docs.py:143:25 - error: Cannot access attribute "config" for class "app"

openlibrary (https://github.com/internetarchive/openlibrary)
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:85:29 - error: Argument of type "None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:85:29 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "None" is not assignable to type "StrPath"
+     Type "data_root" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:129:29 - error: Argument of type "None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:129:29 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "None" is not assignable to type "StrPath"
+     Type "data_root" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:154:44 - error: Argument of type "None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:154:44 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "None" is not assignable to type "StrPath"
+     Type "data_root" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:349:17 - error: Argument of type "None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:349:17 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "None" is not assignable to type "StrPath"
+     Type "data_root" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:480:29 - error: Argument of type "None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/archive.py:480:29 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "None" is not assignable to type "StrPath"
+     Type "data_root" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/code.py:370:25 - error: Argument of type "None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/code.py:370:25 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "None" is not assignable to type "StrPath"
+     Type "data_root" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/coverlib.py:111:13 - error: Argument of type "None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/coverlib.py:111:13 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "None" is not assignable to type "StrPath"
+     Type "data_root" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/coverlib.py:114:29 - error: Argument of type "None" cannot be assigned to parameter "a" of type "StrPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/coverlib.py:114:29 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "StrPath" in function "join"
-     Type "None" is not assignable to type "StrPath"
+     Type "data_root" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:46:14 - error: Operator "+" not supported for types "None" and "Literal['/bad']" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:46:14 - error: Operator "+" not supported for types "data_root" and "Literal['/bad']" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:49:14 - error: Operator "+" not supported for types "None" and "Literal['/bad']" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:49:14 - error: Operator "+" not supported for types "data_root" and "Literal['/bad']" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:83:24 - error: Argument of type "None" cannot be assigned to parameter "a" of type "BytesPath" in function "join"
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:83:24 - error: Argument of type "data_root" cannot be assigned to parameter "a" of type "BytesPath" in function "join"
-     Type "None" is not assignable to type "BytesPath"
+     Type "data_root" is not assignable to type "BytesPath"
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:133:49 - error: Operator "+" not supported for types "None" and "Literal['/localdisk/a.jpg']" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:133:49 - error: Operator "+" not supported for types "data_root" and "Literal['/localdisk/a.jpg']" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:136:12 - error: Operator "+" not supported for types "None" and "Literal['/items/covers_0000/covers_0000_00.tar:1234:10']" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_coverstore.py:136:12 - error: Operator "+" not supported for types "data_root" and "Literal['/items/covers_0000/covers_0000_00.tar:1234:10']" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_webapp.py:95:16 - error: Operator "+" not supported for types "None" and "Literal['/localdisk/']" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/openlibrary/openlibrary/coverstore/tests/test_webapp.py:95:16 - error: Operator "+" not supported for types "data_root" and "Literal['/localdisk/']" (reportOperatorIssue)

sympy (https://github.com/sympy/sympy)
-             Type "None" is not assignable to type "SupportsRichComparison" (reportArgumentType)
+             Type "_size" is not assignable to type "SupportsRichComparison" (reportArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/perm_groups.py:4181:59 - error: Cannot access attribute "index" for class "None"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/perm_groups.py:4181:59 - error: Cannot access attribute "index" for class "_array_form"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/perm_groups.py:4237:59 - error: Cannot access attribute "index" for class "None"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/perm_groups.py:4237:59 - error: Cannot access attribute "index" for class "_array_form"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1114:38 - error: Argument of type "None" cannot be assigned to parameter "start" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1114:38 - error: Argument of type "_size" cannot be assigned to parameter "start" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1117:21 - error: Operator "-" not supported for types "None" and "Literal[1]" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1117:21 - error: Operator "-" not supported for types "_size" and "Literal[1]" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1179:26 - error: Argument of type "None" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1179:26 - error: Argument of type "_size" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1520:13 - error: Operator "*" not supported for types "list[None]" and "None" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1520:13 - error: Operator "*" not supported for types "list[None]" and "_size" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1523:24 - error: Argument of type "None" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1523:24 - error: Argument of type "_size" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1656:29 - error: Operator ">" not supported for types "int" and "None" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1656:29 - error: Operator ">" not supported for types "int" and "_size" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1659:36 - error: Operator "-" not supported for types "None" and "Literal[1]" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1659:36 - error: Operator "-" not supported for types "_size" and "Literal[1]" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1665:35 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1665:35 - error: "_array_form" is not iterable
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1727:70 - error: Operator "-" not supported for types "None" and "Literal[1]" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1727:70 - error: Operator "-" not supported for types "_size" and "Literal[1]" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1897:13 - error: Operator "-" not supported for types "None" and "Literal[1]" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1897:13 - error: Operator "-" not supported for types "_size" and "Literal[1]" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1958:20 - error: Operator "-" not supported for types "None" and "int" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:1958:20 - error: Operator "-" not supported for types "_size" and "int" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2083:56 - error: Argument of type "None" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2083:56 - error: Argument of type "_size" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2382:17 - error: Operator "-=" not supported for types "None" and "int"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2382:17 - error: Operator "-=" not supported for types "_size" and "int"
-     Operator "-" not supported for types "None" and "int" (reportOperatorIssue)
+     Operator "-" not supported for types "_size" and "int" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2530:27 - error: Argument of type "None" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2530:27 - error: Argument of type "_size" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2704:24 - error: Argument of type "None" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2704:24 - error: Argument of type "_size" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2705:28 - error: Argument of type "None" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2705:28 - error: Argument of type "_size" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2710:25 - error: Operator "-" not supported for types "None" and "Literal[1]" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2710:25 - error: Operator "-" not supported for types "_size" and "Literal[1]" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2752:24 - error: Operator "-" not supported for types "None" and "Literal[1]" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2752:24 - error: Operator "-" not supported for types "_size" and "Literal[1]" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2793:24 - error: Argument of type "None" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2793:24 - error: Argument of type "_size" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2794:28 - error: Argument of type "None" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2794:28 - error: Argument of type "_size" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2799:13 - error: Operator "-" not supported for types "None" and "int" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/permutations.py:2799:13 - error: Operator "-" not supported for types "_size" and "int" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/prufer.py:312:24 - error: Operator "-" not supported for types "None" and "Literal[3]" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/prufer.py:312:24 - error: Operator "-" not supported for types "_nodes" and "Literal[3]" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/prufer.py:314:13 - error: Operator "*=" not supported for types "Literal[1]" and "None"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/prufer.py:314:13 - error: Operator "*=" not supported for types "Literal[1]" and "_nodes"
-     Operator "*" not supported for types "Literal[1]" and "None" (reportOperatorIssue)
+     Operator "*" not supported for types "Literal[1]" and "_nodes" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/subsets.py:413:20 - error: Argument of type "None" cannot be assigned to parameter "obj" of type "Sized" in function "len"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/subsets.py:413:20 - error: Argument of type "_subset" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/subsets.py:453:20 - error: Argument of type "None" cannot be assigned to parameter "obj" of type "Sized" in function "len"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/subsets.py:453:20 - error: Argument of type "_superset" cannot be assigned to parameter "obj" of type "Sized" in function "len"

... (truncated 464 lines) ...

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
-   /tmp/mypy_primer/projects/mongo-python-driver/test/test_bson.py:1442:24 - error: Type "None" is not assignable to declared type "(self: Self@object) -> int"
+   /tmp/mypy_primer/projects/mongo-python-driver/test/test_bson.py:1442:24 - error: Type "__hash__" is not assignable to declared type "(self: Self@object) -> int"

mitmproxy (https://github.com/mitmproxy/mitmproxy)
-   /tmp/mypy_primer/projects/mitmproxy/mitmproxy/proxy/mode_specs.py:298:20 - error: Type "None" is not assignable to declared type "property"
+   /tmp/mypy_primer/projects/mitmproxy/mitmproxy/proxy/mode_specs.py:298:20 - error: Type "default_port" is not assignable to declared type "property"
-   /tmp/mypy_primer/projects/mitmproxy/mitmproxy/proxy/mode_specs.py:310:20 - error: Type "None" is not assignable to declared type "property"
+   /tmp/mypy_primer/projects/mitmproxy/mitmproxy/proxy/mode_specs.py:310:20 - error: Type "default_port" is not assignable to declared type "property"

pip (https://github.com/pypa/pip)
-   /tmp/mypy_primer/projects/pip/src/pip/_internal/resolution/resolvelib/candidates.py:343:19 - error: Type "None" is not assignable to declared type "property"
+   /tmp/mypy_primer/projects/pip/src/pip/_internal/resolution/resolvelib/candidates.py:343:19 - error: Type "source_link" is not assignable to declared type "property"
-   /tmp/mypy_primer/projects/pip/src/pip/_internal/resolution/resolvelib/candidates.py:534:19 - error: Type "None" is not assignable to declared type "property"
+   /tmp/mypy_primer/projects/pip/src/pip/_internal/resolution/resolvelib/candidates.py:534:19 - error: Type "source_link" is not assignable to declared type "property"
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/poolmanager.py:347:46 - error: Cannot access attribute "use_forwarding_for_https" for class "None"
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/poolmanager.py:347:46 - error: Cannot access attribute "use_forwarding_for_https" for class "proxy_config"
-   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/response.py:111:32 - error: Cannot access attribute "Decompressor" for class "None"
+   /tmp/mypy_primer/projects/pip/src/pip/_vendor/urllib3/response.py:111:32 - error: Cannot access attribute "Decompressor" for class "brotli"

streamlit (https://github.com/streamlit/streamlit)
-   /tmp/mypy_primer/projects/streamlit/lib/tests/streamlit/runtime/scriptrunner/test_data/runtime_error.py:24:5 - error: Cannot access attribute "do_a_thing" for class "None"
+   /tmp/mypy_primer/projects/streamlit/lib/tests/streamlit/runtime/scriptrunner/test_data/runtime_error.py:24:5 - error: Cannot access attribute "do_a_thing" for class "bad"

scrapy (https://github.com/scrapy/scrapy)
-   /tmp/mypy_primer/projects/scrapy/tests/spiders.py:371:27 - error: Argument of type "None" cannot be assigned to parameter "url" of type "str" in function "__init__"
+   /tmp/mypy_primer/projects/scrapy/tests/spiders.py:371:27 - error: Argument of type "seed" cannot be assigned to parameter "url" of type "str" in function "__init__"

dd-trace-py (https://github.com/DataDog/dd-trace-py)
-   /tmp/mypy_primer/projects/dd-trace-py/setup.py:159:29 - error: Argument of type "None" cannot be assigned to parameter "args" of type "StrPath" in function "__new__"
+   /tmp/mypy_primer/projects/dd-trace-py/setup.py:159:29 - error: Argument of type "download_dir" cannot be assigned to parameter "args" of type "StrPath" in function "__new__"
-     Type "None" is not assignable to type "StrPath"
+     Type "download_dir" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/dd-trace-py/setup.py:159:29 - error: Argument of type "None" cannot be assigned to parameter "args" of type "StrPath" in function "__init__"
+   /tmp/mypy_primer/projects/dd-trace-py/setup.py:159:29 - error: Argument of type "download_dir" cannot be assigned to parameter "args" of type "StrPath" in function "__init__"
-     Type "None" is not assignable to type "StrPath"
+     Type "download_dir" is not assignable to type "StrPath"
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:381:20 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:381:20 - error: "NoSuchProcess" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:381:20 - error: "ZombieProcess" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:381:20 - error: "tuple[None, None]" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:381:20 - error: "tuple[NoSuchProcess, ZombieProcess]" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:509:12 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:509:12 - error: "NoSuchProcess" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:509:12 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:509:12 - error: "NoSuchProcess" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:511:12 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:511:12 - error: "AccessDenied" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:511:12 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psbsd.py:511:12 - error: "AccessDenied" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:252:16 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:252:16 - error: "NoSuchProcess" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:252:16 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:252:16 - error: "NoSuchProcess" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:321:16 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:321:16 - error: "NoSuchProcess" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:321:16 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:321:16 - error: "NoSuchProcess" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:323:16 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:323:16 - error: "AccessDenied" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:323:16 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:323:16 - error: "AccessDenied" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:363:20 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:363:20 - error: "NoSuchProcess" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:363:20 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_psosx.py:363:20 - error: "NoSuchProcess" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pssunos.py:472:16 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pssunos.py:472:16 - error: "AccessDenied" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pssunos.py:472:16 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pssunos.py:472:16 - error: "AccessDenied" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pssunos.py:482:16 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pssunos.py:482:16 - error: "AccessDenied" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pssunos.py:482:16 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pssunos.py:482:16 - error: "AccessDenied" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pswindows.py:783:20 - error: "None" is not iterable
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pswindows.py:783:20 - error: "AccessDenied" is not iterable
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pswindows.py:783:20 - error: "None" is not a valid exception class (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/vendor/psutil/_pswindows.py:783:20 - error: "AccessDenied" is not a valid exception class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:362:46 - error: Argument of type "None" cannot be assigned to parameter "name" of type "str" in function "import_module"
+   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:362:46 - error: Argument of type "__module_name__" cannot be assigned to parameter "name" of type "str" in function "import_module"
-   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:380:46 - error: Argument of type "None" cannot be assigned to parameter "name" of type "str" in function "import_module"
+   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:380:46 - error: Argument of type "__module_name__" cannot be assigned to parameter "name" of type "str" in function "import_module"
-   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:400:46 - error: Argument of type "None" cannot be assigned to parameter "name" of type "str" in function "import_module"
+   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:400:46 - error: Argument of type "__module_name__" cannot be assigned to parameter "name" of type "str" in function "import_module"
-   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:421:46 - error: Argument of type "None" cannot be assigned to parameter "name" of type "str" in function "import_module"
+   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:421:46 - error: Argument of type "__module_name__" cannot be assigned to parameter "name" of type "str" in function "import_module"
-   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:442:46 - error: Argument of type "None" cannot be assigned to parameter "name" of type "str" in function "import_module"
+   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:442:46 - error: Argument of type "__module_name__" cannot be assigned to parameter "name" of type "str" in function "import_module"
-   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:464:46 - error: Argument of type "None" cannot be assigned to parameter "name" of type "str" in function "import_module"
+   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:464:46 - error: Argument of type "__module_name__" cannot be assigned to parameter "name" of type "str" in function "import_module"
-   /tmp/mypy_primer/projects/dd-trace-py/tests/contrib/patch.py:492:46 - error: Argument of type "None" cannot be assigned to parameter "name" of type "str" in function "import_module"

... (truncated 70 lines) ...```

@erictraut erictraut closed this Oct 1, 2024
@erictraut erictraut deleted the issue-9120 branch October 1, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant