-
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
Fixed issue that results in non-deterministic false positive error, o… #9250
Merged
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
…ften relating to the "awaitable" check. This addresses #9204.
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1127:39 - error: Cannot access attribute "items" for class "type[type[Order]]"
- Attribute "items" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1143:26 - error: Argument of type "Any | type[None] | type[Unknown] | type[type[Unknown]] | type[type[Order]] | dict[Unknown, Unknown]" cannot be assigned to parameter "iterable" of type "Iterable[list[bytes]]" in function "__init__"
+ /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1143:26 - error: Argument of type "Any | type[None] | type[Unknown] | type[type[Unknown]] | dict[Unknown, Unknown]" cannot be assigned to parameter "iterable" of type "Iterable[list[bytes]]" in function "__init__"
- Type "Any | type[None] | type[Unknown] | type[type[Unknown]] | type[type[Order]] | dict[Unknown, Unknown]" is not assignable to type "Iterable[list[bytes]]"
+ Type "Any | type[None] | type[Unknown] | type[type[Unknown]] | dict[Unknown, Unknown]" is not assignable to type "Iterable[list[bytes]]"
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1145:28 - error: Expected no type arguments for class "Order" (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1148:26 - error: Argument of type "Any | type[None] | type[Unknown] | type[type[Unknown]] | type[type[Order]] | dict[Unknown, Unknown]" cannot be assigned to parameter "iterable" of type "Iterable[list[bytes]]" in function "__init__"
+ /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1148:26 - error: Argument of type "Any | type[None] | type[Unknown] | type[type[Unknown]] | dict[Unknown, Unknown]" cannot be assigned to parameter "iterable" of type "Iterable[list[bytes]]" in function "__init__"
- Type "Any | type[None] | type[Unknown] | type[type[Unknown]] | type[type[Order]] | dict[Unknown, Unknown]" is not assignable to type "Iterable[list[bytes]]"
+ Type "Any | type[None] | type[Unknown] | type[type[Unknown]] | dict[Unknown, Unknown]" is not assignable to type "Iterable[list[bytes]]"
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1150:28 - error: Expected no type arguments for class "Order" (reportInvalidTypeArguments)
- Attribute "items" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1153:28 - error: Cannot access attribute "items" for class "type[type[Order]]"
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1158:28 - error: Cannot access attribute "items" for class "type[type[Order]]"
- Attribute "items" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1163:12 - error: Cannot access attribute "update" for class "type[type[Order]]"
- Attribute "update" is unknown (reportAttributeAccessIssue)
- Attribute "values" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1165:30 - error: Cannot access attribute "values" for class "type[type[Order]]"
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1179:26 - error: Operator "*" not supported for types "list[Unknown]" and "Any | type[None] | Unknown | type[type[Unknown]] | type[type[Order]]"
+ /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1179:26 - error: Operator "*" not supported for types "list[Unknown]" and "Any | type[None] | Unknown | type[type[Unknown]]"
- Operator "*" not supported for types "list[Unknown]" and "type[type[Unknown]]" when expected type is "Iterable[Unknown]"
- Operator "*" not supported for types "list[Unknown]" and "type[type[Order]]" when expected type is "Iterable[Unknown]" (reportOperatorIssue)
+ Operator "*" not supported for types "list[Unknown]" and "type[type[Unknown]]" when expected type is "Iterable[Unknown]" (reportOperatorIssue)
- /tmp/mypy_primer/projects/sympy/sympy/polys/polyroots.py:1179:40 - error: Expected no type arguments for class "Order" (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/sympy/sympy/polys/numberfields/tests/test_primes.py:36:14 - error: "type[type[type[int]]]" is not iterable
- "__iter__" method not defined (reportGeneralTypeIssues)
- "__iter__" method not defined (reportGeneralTypeIssues)
- /tmp/mypy_primer/projects/sympy/sympy/polys/numberfields/tests/test_primes.py:58:14 - error: "type[type[type[int]]]" is not iterable
- /tmp/mypy_primer/projects/sympy/sympy/polys/numberfields/tests/test_utilities.py:20:41 - error: Expected no type arguments for class "int" (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/sympy/sympy/polys/numberfields/tests/test_utilities.py:24:26 - error: Expected no type arguments for class "int" (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/sympy/sympy/polys/numberfields/tests/test_utilities.py:25:22 - error: Expected no type arguments for class "int" (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/sympy/sympy/polys/numberfields/tests/test_utilities.py:25:40 - error: Expected no type arguments for class "int" (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/sympy/sympy/polys/numberfields/tests/test_utilities.py:27:29 - error: Expected no type arguments for class "int" (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:105:15 - error: Cannot access attribute "is_rational_function" for class "type[type[bool]]"
- Attribute "is_rational_function" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:105:15 - error: Cannot access attribute "is_rational_function" for class "type[type[Basic]]"
- Attribute "is_rational_function" is unknown (reportAttributeAccessIssue)
- Attribute "as_numer_denom" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:108:19 - error: Cannot access attribute "as_numer_denom" for class "type[type[bool]]"
- Attribute "as_numer_denom" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:108:19 - error: Cannot access attribute "as_numer_denom" for class "type[type[Basic]]"
- 81662 errors, 1227 warnings, 0 informations
+ 81643 errors, 1227 warnings, 0 informations
kopf (https://github.com/nolar/kopf)
- /tmp/mypy_primer/projects/kopf/kopf/_core/reactor/running.py:336:27 - error: Argument of type "partial[Coroutine[Any, Any, None]]" cannot be assigned to parameter "processor" of type "WatchStreamProcessor" in function "ochestrator"
- "partial[Coroutine[Any, Any, None]]" is incompatible with protocol "WatchStreamProcessor"
- "__call__" is an incompatible type
- Type "(resource: Resource, raw_event: RawEvent, stream_pressure: Event | None = ..., resource_indexed: Toggle | None = ..., operator_indexed: ToggleSet | None = ..., lifecycle: LifeCycleFn = ..., indexers: OperatorIndexers = ..., registry: OperatorRegistry = ..., settings: OperatorSettings = ..., memories: ResourceMemories = ..., memobase: AnyMemo = ..., event_queue: K8sEventQueue = ...) -> Coroutine[Any, Any, None]" is not assignable to type "(*, raw_event: RawEvent, stream_pressure: Event | None = None, resource_indexed: Toggle | None = None, operator_indexed: ToggleSet | None = None) -> Coroutine[Any, Any, None]"
- Extra parameter "resource" (reportArgumentType)
- 1168 errors, 19 warnings, 0 informations
+ 1167 errors, 19 warnings, 0 informations
jax (https://github.com/google/jax)
- /tmp/mypy_primer/projects/jax/jax/_src/lax/control_flow/conditionals.py:1017:7 - error: Argument of type "partial[Sequence[Unknown]]" cannot be assigned to parameter "value" of type "LoweringRule" in function "__setitem__"
- "partial[Sequence[Unknown]]" is incompatible with protocol "LoweringRule"
- "__call__" is an incompatible type
- Type "(ctx: LoweringRuleContext, ..., i: int = ...) -> Sequence[Unknown]" is not assignable to type "(ctx: LoweringRuleContext, *args: Unknown | Sequence[Unknown], **kw: Unknown) -> Sequence[Unknown | Sequence[Unknown]]"
- Parameter "*args" has no corresponding parameter
- Parameter "**kw" has no corresponding parameter (reportArgumentType)
- /tmp/mypy_primer/projects/jax/jax/_src/lax/control_flow/conditionals.py:1024:21 - error: Argument of type "partial[Sequence[Unknown]] | None" cannot be assigned to parameter "default_rule" of type "LoweringRule | None" in function "lower_per_platform"
- Type "partial[Sequence[Unknown]] | None" is not assignable to type "LoweringRule | None"
- Type "partial[Sequence[Unknown]]" is not assignable to type "LoweringRule | None"
- "partial[Sequence[Unknown]]" is incompatible with protocol "LoweringRule"
- "__call__" is an incompatible type
- Type "(ctx: LoweringRuleContext, ..., i: int = ...) -> Sequence[Unknown]" is not assignable to type "(ctx: LoweringRuleContext, *args: Unknown | Sequence[Unknown], **kw: Unknown) -> Sequence[Unknown | Sequence[Unknown]]"
- "partial[Sequence[Unknown]]" is not assignable to "None" (reportArgumentType)
- 6482 errors, 26 warnings, 0 informations
+ 6480 errors, 26 warnings, 0 informations
|
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.
…ften relating to the "awaitable" check. This addresses #9204.