-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Removed the NoneType
which has historically been used to track `Non…
#6258
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e` and `type[None]` within pyright's logic. The new logic now models `None` like any other class and simply uses `ClassType` to track values of this type. This eliminates a bunch of special-case logic and edge-case bugs.
Diff from mypy_primer, showing the effect of this PR on open source code: bidict (https://github.com/jab/bidict)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "ref" is incompatible with "None" (reportGeneralTypeIssues)
alectryon (https://github.com/cpitclaudel/alectryon)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
spack (https://github.com/spack/spack)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "bool" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "bool" is incompatible with "None" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "ModuleSpec" (reportGeneralTypeIssues)
+ "None" is incompatible with "ModuleSpec" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "bool"
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "None" is incompatible with "bool"
+ "function" is incompatible with "None" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "bool" (reportGeneralTypeIssues)
+ "None" is incompatible with "bool" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "int" (reportGeneralTypeIssues)
+ "None" is incompatible with "int" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "bool" (reportGeneralTypeIssues)
+ "None" is incompatible with "bool" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "int" (reportGeneralTypeIssues)
+ "None" is incompatible with "int" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "int" (reportGeneralTypeIssues)
+ "None" is incompatible with "int" (reportGeneralTypeIssues)
- Type "Unknown | syaml_dict | Any | None" cannot be assigned to type "Iterable[Unknown]"
+ Type "Unknown | syaml_dict | Any | None" cannot be assigned to type "Iterable[_T@sorted]"
+ "None" is incompatible with protocol "Iterable[_T@sorted]"
- "__iter__" is not present (reportGeneralTypeIssues)
+ "__iter__" is not present (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/spack/lib/spack/spack/audit.py:190:74 - error: "__getitem__" method not defined on type "object*" (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "Iterable[str]"
- "__iter__" is not present (reportGeneralTypeIssues)
+ "__iter__" is not present (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "ArchSpec" (reportGeneralTypeIssues)
+ "None" is incompatible with "ArchSpec" (reportGeneralTypeIssues)
- "bool" is incompatible with protocol "SupportsRead[str | bytes]"
+ "None" is incompatible with protocol "SupportsRead[str | bytes]"
- /tmp/mypy_primer/projects/spack/lib/spack/spack/binary_distribution.py:191:69 - error: "None" is not iterable (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/spack/lib/spack/spack/binary_distribution.py:191:69 - error: "None" is not iterable
+ "__iter__" method not defined (reportGeneralTypeIssues)
- /tmp/mypy_primer/projects/spack/lib/spack/spack/binary_distribution.py:507:69 - error: "None" is not iterable (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/spack/lib/spack/spack/binary_distribution.py:507:69 - error: "None" is not iterable
+ "__iter__" method not defined (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "_ReadableStream"
- "read" is not present
+ "read" is not present
- "seek" is not present
+ "seek" is not present
- "close" is not present (reportGeneralTypeIssues)
+ "close" is not present (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- "syaml_dict" is incompatible with "bool" (reportGeneralTypeIssues)
+ "None" is incompatible with "bool" (reportGeneralTypeIssues)
- "syaml_dict" is incompatible with "bool" (reportGeneralTypeIssues)
+ "None" is incompatible with "bool" (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "_ReadableStream"
- "read" is not present
+ "read" is not present
- "seek" is not present
+ "seek" is not present
- "close" is not present (reportGeneralTypeIssues)
+ "close" is not present (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "_ReadableStream"
- "read" is not present
+ "read" is not present
- "seek" is not present
+ "seek" is not present
- "close" is not present (reportGeneralTypeIssues)
+ "close" is not present (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Path" (reportGeneralTypeIssues)
+ "None" is incompatible with "Path" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Path" (reportGeneralTypeIssues)
+ "None" is incompatible with "Path" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "_ReadableStream"
- "read" is not present
+ "read" is not present
- "seek" is not present
+ "seek" is not present
- "close" is not present (reportGeneralTypeIssues)
+ "close" is not present (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "ConfigScope" is incompatible with "None" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "bool"
- Type cannot be assigned to type "None"
+ "None" is incompatible with "bool"
+ "function" is incompatible with "None"
- Type "None" cannot be assigned to type "bool"
- Type cannot be assigned to type "None"
+ "None" is incompatible with "bool"
+ "function" is incompatible with "None"
- Type "None" cannot be assigned to type "bool"
- Type cannot be assigned to type "None"
+ "None" is incompatible with "bool"
+ "function" is incompatible with "None"
- Type "list[Spec] | list[Unknown] | None" cannot be assigned to type "Iterable[Spec]"
+ Type "list[Spec] | list[Unknown] | None" cannot be assigned to type "Iterable[_T@set]"
+ "None" is incompatible with protocol "Iterable[_T@set]"
- "__iter__" is not present (reportGeneralTypeIssues)
+ "__iter__" is not present (reportGeneralTypeIssues)
- /tmp/mypy_primer/projects/spack/lib/spack/spack/database.py:1600:23 - error: Argument of type "list[Spec]" cannot be assigned to parameter "__iterable" of type "Iterable[SupportsRichComparisonT@sorted]" in function "sorted"
- "list[Spec]" is incompatible with "Iterable[SupportsRichComparisonT@sorted]"
- Type parameter "_T_co@Iterable" is covariant, but "Spec" is not a subtype of "SupportsRichComparisonT@sorted"
- Type "Spec" cannot be assigned to type "SupportsRichComparison"
- Type "Spec" cannot be assigned to type "SupportsRichComparison"
- "Spec" is incompatible with protocol "SupportsDunderLT[Any]"
- "Spec" is incompatible with protocol "SupportsDunderGT[Any]" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "bool"
- Type cannot be assigned to type "None"
+ "None" is incompatible with "bool"
+ "function" is incompatible with "None"
- Type "None" cannot be assigned to type "bool"
- Type cannot be assigned to type "None"
+ "None" is incompatible with "bool"
+ "function" is incompatible with "None"
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "bool" (reportGeneralTypeIssues)
+ "None" is incompatible with "bool" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "BaseException" (reportGeneralTypeIssues)
+ "None" is incompatible with "BaseException" (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "SupportsRead[AnyStr@copyfileobj]"
- "read" is not present (reportGeneralTypeIssues)
+ "read" is not present (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "SupportsRead[AnyStr@copyfileobj]"
- "read" is not present (reportGeneralTypeIssues)
+ "read" is not present (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "SupportsRead[AnyStr@copyfileobj]"
- "read" is not present (reportGeneralTypeIssues)
+ "read" is not present (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "SupportsIndex"
- "__index__" is not present (reportGeneralTypeIssues)
... (truncated 449 lines) ...
koda-validate (https://github.com/keithasaurus/koda-validate)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Coercer[A@coercer]" is incompatible with "None" (reportGeneralTypeIssues)
steam.py (https://github.com/Gobot1234/steam.py)
+ /tmp/mypy_primer/projects/steam.py/steam/http.py:225:28 - error: Argument of type "AsyncGenerator[User, None]" cannot be assigned to parameter "__i" of type "SupportsAnext[_T@anext]" in function "anext"
+ "AsyncGenerator[User, None]" is incompatible with protocol "SupportsAnext[None]"
+ "__anext__" is an incompatible type
+ Type "() -> Awaitable[User]" cannot be assigned to type "() -> Awaitable[_T_co@SupportsAnext]"
+ Function return type "Awaitable[User]" is incompatible with type "Awaitable[_T_co@SupportsAnext]"
+ "Awaitable[User]" is incompatible with "Awaitable[_T_co@SupportsAnext]" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/http.py:225:58 - error: Argument of type "None" cannot be assigned to parameter "default" of type "_VT@anext" in function "anext"
+ "None" is incompatible with "User" (reportGeneralTypeIssues)
- 7929 errors, 22 warnings, 0 informations
+ 7931 errors, 22 warnings, 0 informations
Tanjun (https://github.com/FasterSpeeding/Tanjun)
- Type "None" cannot be assigned to type "Coroutine[Any, Any, None]" (reportGeneralTypeIssues)
+ "None" is incompatible with "Coroutine[Any, Any, None]" (reportGeneralTypeIssues)
freqtrade (https://github.com/freqtrade/freqtrade)
- Type "None" cannot be assigned to type "float" (reportGeneralTypeIssues)
+ "None" is incompatible with "float" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "float" (reportGeneralTypeIssues)
+ "None" is incompatible with "float" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "float" (reportGeneralTypeIssues)
+ "None" is incompatible with "float" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "float" (reportGeneralTypeIssues)
+ "None" is incompatible with "float" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Path" (reportGeneralTypeIssues)
+ "None" is incompatible with "Path" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "int" (reportGeneralTypeIssues)
+ "None" is incompatible with "int" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "int" (reportGeneralTypeIssues)
+ "None" is incompatible with "int" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "float" (reportGeneralTypeIssues)
+ "None" is incompatible with "float" (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "Iterator[_T_co@contextmanager]"
- "__next__" is not present
+ "__next__" is not present
- "__iter__" is not present (reportGeneralTypeIssues)
+ "__iter__" is not present (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "RPC" (reportGeneralTypeIssues)
+ "None" is incompatible with "RPC" (reportGeneralTypeIssues)
operator (https://github.com/canonical/operator)
+ /tmp/mypy_primer/projects/operator/test/test_main.py
+ /tmp/mypy_primer/projects/operator/test/test_main.py:369:42 - error: Cannot access member "_data" for type "StoredState"
+ Member "_data" is unknown (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:369:35 - error: Type of "_data" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:369:35 - error: Type of "handle" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:369:35 - error: Type of "path" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:369:35 - error: Argument type is unknown
+ Argument corresponds to parameter "handle_path" in function "save_snapshot" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/operator/test/test_main.py:374:16 - error: Expression of type "StoredState | StoredStateData" cannot be assigned to return type "BoundStoredState | StoredStateData" (reportGeneralTypeIssues)
- 56 errors, 0 warnings, 0 informations
+ 62 errors, 0 warnings, 0 informations
pydantic (https://github.com/samuelcolvin/pydantic)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "ellipsis" is incompatible with "None" (reportGeneralTypeIssues)
pyp (https://github.com/hauntsaninja/pyp)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "bytes" is incompatible with "None" (reportGeneralTypeIssues)
discord.py (https://github.com/Rapptz/discord.py)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
dd-trace-py (https://github.com/DataDog/dd-trace-py)
- Type "None" cannot be assigned to type "ModuleSpec" (reportGeneralTypeIssues)
+ "None" is incompatible with "ModuleSpec" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "int"
- Type "None" cannot be assigned to type "str"
- Type "None" cannot be assigned to type "bytes"
+ "None" is incompatible with "int"
+ "None" is incompatible with "str"
+ "None" is incompatible with "bytes"
+ "None" is incompatible with protocol "PathLike[str]"
- "__fspath__" is not present
+ "__fspath__" is not present
+ "None" is incompatible with protocol "PathLike[bytes]"
- "__fspath__" is not present (reportGeneralTypeIssues)
+ "__fspath__" is not present (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "int"
- Type "None" cannot be assigned to type "str"
- Type "None" cannot be assigned to type "bytes"
+ "None" is incompatible with "int"
+ "None" is incompatible with "str"
+ "None" is incompatible with "bytes"
+ "None" is incompatible with protocol "PathLike[str]"
- "__fspath__" is not present
+ "__fspath__" is not present
+ "None" is incompatible with protocol "PathLike[bytes]"
- "__fspath__" is not present (reportGeneralTypeIssues)
+ "__fspath__" is not present (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str"
- Type "None" cannot be assigned to type "bytes"
+ "None" is incompatible with "str"
+ "None" is incompatible with "bytes"
+ "None" is incompatible with protocol "PathLike[str]"
- "__fspath__" is not present
+ "__fspath__" is not present
+ "None" is incompatible with protocol "PathLike[bytes]"
- "__fspath__" is not present (reportGeneralTypeIssues)
+ "__fspath__" is not present (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "SupportsNext[_T@next]"
- "__next__" is not present (reportGeneralTypeIssues)
+ "__next__" is not present (reportGeneralTypeIssues)
+ "None" is incompatible with protocol "SupportsNext[_T@next]"
- "__next__" is not present (reportGeneralTypeIssues)
+ "__next__" is not present (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "bool" (reportGeneralTypeIssues)
+ "None" is incompatible with "bool" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "dict[Unknown, Unknown]" is incompatible with "None" (reportGeneralTypeIssues)
- /tmp/mypy_primer/projects/dd-trace-py/ddtrace/appsec/_metrics.py:75:59 - error: "None" is not iterable (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/dd-trace-py/ddtrace/appsec/_metrics.py:75:59 - error: "None" is not iterable
+ "__iter__" method not defined (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "ddwaf_context_capsule" (reportGeneralTypeIssues)
+ "None" is incompatible with "ddwaf_context_capsule" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type cannot be assigned to type "None" (reportGeneralTypeIssues)
+ "Literal[',:']" is incompatible with "None" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/dd-trace-py/ddtrace/commands/ddtrace_run.py:141:12 - error: "None" is not iterable
+ "__iter__" method not defined (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Mapping[str, str]" (reportGeneralTypeIssues)
+ "None" is incompatible with "Mapping[str, str]" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Pattern[Unknown]" (reportGeneralTypeIssues)
+ "None" is incompatible with "Pattern[Unknown]" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Dict[str, str]" (reportGeneralTypeIssues)
+ "None" is incompatible with "Dict[str, str]" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "Dict[_TagNameType, Any]" (reportGeneralTypeIssues)
- "Dict[str, str]" is incompatible with "Dict[_TagNameType, Any]"
- Type parameter "_KT@dict" is invariant, but "str" is not the same as "_TagNameType" (reportGeneralTypeIssues)
+ "None" is incompatible with "Dict[_TagNameType, Any]" (reportGeneralTypeIssues)
- "Dict[str, str]" is incompatible with "Dict[_TagNameType, Any]"
- Type parameter "_KT@dict" is invariant, but "str" is not the same as "_TagNameType" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Pin" (reportGeneralTypeIssues)
+ "None" is incompatible with "Pin" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Pin" (reportGeneralTypeIssues)
+ "None" is incompatible with "Pin" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Pin" (reportGeneralTypeIssues)
+ "None" is incompatible with "Pin" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "List[Any]" (reportGeneralTypeIssues)
+ "None" is incompatible with "List[Any]" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+ "None" is incompatible with "str" (reportGeneralTypeIssues)
- Type "None" cannot be assigned to type "Text" (reportGeneralTypeIssues)
+ "None" is incompatible with "Text" (reportGeneralTypeIssues)
+ "None" is incompatible with "Dict[_TagNameType, Any]" (reportGeneralTypeIssues)
- "Dict[str, str]" is incompatible with "Dict[_TagNameType, Any]"
- Type parameter "_KT@dict" is invariant, but "str" is not the same as "_TagNameType" (reportGeneralTypeIssues)
+ "None" is incompatible with "Dict[_TagNameType, Any]" (reportGeneralTypeIssues)
... (truncated 159 lines) ...``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…e
and
type[None]within pyright's logic. The new logic now models
Nonelike any other class and simply uses
ClassType` to track values of this type. This eliminates a bunch of special-case logic and edge-case bugs.