Removed some circular module dependencies.#10485
Merged
Conversation
Contributor
|
@erictraut, would you mind holding off on merging this for a little bit? I'd like to finish the pull of pyright into pylance before any additional commits occur on top of yesterday's release. |
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
|
@debonte, yeah, I can hold off. Let me know when you're done. |
Contributor
|
Thanks. Btw, #10486 is not what I'm talking about. I need to do the pull in to pyrx manually since there's a merge conflict. |
Contributor
|
@erictraut, ok, I'm done with the pull into pyrx. Feel free to merge this. |
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
- ...:540:50 - error: "Set" is not iterable
- "__iter__" method not defined (reportGeneralTypeIssues)
+ ...:2542:9 - error: Method "_cdf" overrides class "SingleContinuousDistribution" in an incompatible manner
+ Return type mismatch: base method returns type "None", override returns type "ComplexInfinity | NaN | Rational | Unknown"
+ Type "ComplexInfinity | NaN | Rational | Unknown" is not assignable to type "None"
+ "ComplexInfinity" is not assignable to "None" (reportIncompatibleMethodOverride)
+ ...:2721:9 - error: Method "_cdf" overrides class "SingleContinuousDistribution" in an incompatible manner
+ Return type mismatch: base method returns type "None", override returns type "Expr | NaN | ComplexInfinity | Rational | Unknown"
+ Type "Expr | NaN | ComplexInfinity | Rational | Unknown" is not assignable to type "None"
+ "Expr" is not assignable to "None" (reportIncompatibleMethodOverride)
- ...:261:48 - error: Cannot access attribute "doit" for class "tuple[Unknown, ...]"
- Attribute "doit" is unknown (reportAttributeAccessIssue)
- ...:261:48 - error: "doit" is not a known attribute of "None" (reportOptionalMemberAccess)
- ...:268:22 - error: Argument of type "Generator[tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None, None, None]" cannot be assigned to parameter "iterable" of type "Iterable[_SupportsSumNoDefaultT@sum]" in function "sum"
+ ...:268:22 - error: Argument of type "Generator[Unknown | int | None, None, None]" cannot be assigned to parameter "iterable" of type "Iterable[_SupportsSumNoDefaultT@sum]" in function "sum"
- "Generator[tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None, None, None]" is not assignable to "Iterable[_SupportsSumNoDefaultT@sum]"
+ "Generator[Unknown | int | None, None, None]" is not assignable to "Iterable[_SupportsSumNoDefaultT@sum]"
- Type parameter "_T_co@Iterable" is covariant, but "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None" is not a subtype of "_SupportsSumNoDefaultT@sum"
+ Type parameter "_T_co@Iterable" is covariant, but "Unknown | int | None" is not a subtype of "_SupportsSumNoDefaultT@sum"
- Type "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
+ Type "Unknown | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
- Type "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
+ Type "Unknown | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
- "Basic" is incompatible with protocol "_SupportsSumWithNoDefaultGiven" (reportArgumentType)
+ "None" is incompatible with protocol "_SupportsSumWithNoDefaultGiven" (reportArgumentType)
+ ...:138:17 - error: Argument of type "NaN | ComplexInfinity | Rational | Unknown | Expr" cannot be assigned to parameter "value" of type "int" in function "__setitem__"
+ Type "NaN | ComplexInfinity | Rational | Unknown | Expr" is not assignable to type "int"
+ "Expr" is not assignable to "int" (reportArgumentType)
- ...:473:25 - error: Argument of type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | tuple[Unknown, ...] | Sum | NaN | Piecewise | Basic | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | int" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
- Type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | tuple[Unknown, ...] | Sum | NaN | Piecewise | Basic | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | int" is not assignable to type "Expr | complex"
- Type "Basic" is not assignable to type "Expr | complex"
- "Basic" is not assignable to "Expr"
- "Basic" is not assignable to "complex" (reportArgumentType)
- ...:741:20 - error: "Set" is not iterable
- "__iter__" method not defined (reportGeneralTypeIssues)
- ...:1839:25 - error: Argument of type "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | Integral | Any | int | None" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
+ ...:1839:25 - error: Argument of type "tuple[Unknown, ...] | Unknown | Sum | Expr | Any | Add | Zero | NaN | Piecewise | Basic | Integral | int | None" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
- Type "tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Basic | Integral | Any | int | None" is not assignable to type "Expr | complex"
+ Type "tuple[Unknown, ...] | Unknown | Sum | Expr | Any | Add | Zero | NaN | Piecewise | Basic | Integral | int | None" is not assignable to type "Expr | complex"
- ...:1894:27 - error: Cannot access attribute "doit" for class "tuple[Unknown, ...]"
- Attribute "doit" is unknown (reportAttributeAccessIssue)
- Return type mismatch: base method returns type "Self@Basic", override returns type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | Self@Expectation | Literal[0] | None"
+ Return type mismatch: base method returns type "Self@Basic", override returns type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | Self@Expectation | Literal[0] | None"
- Type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | Expectation* | Literal[0] | None" is not assignable to type "Basic"
+ Type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | Expectation* | Literal[0] | None" is not assignable to type "Basic"
+ ...:74:9 - error: Method "doit" overrides class "Basic" in an incompatible manner
+ Return type mismatch: base method returns type "Basic", override returns type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | ComplexInfinity | Expr | Float | Infinity | Integer | Lambda | NaN | NegativeInfinity | NegativeOne | Number | Piecewise | Rational | Integral | Literal[0]"
+ Type "Unknown | Any | BernoulliDistribution | Probability | Zero | One | ComplexInfinity | Expr | Float | Infinity | Integer | Lambda | NaN | NegativeInfinity | NegativeOne | Number | Piecewise | Rational | Integral | Literal[0]" is not assignable to type "Basic"
+ "Literal[0]" is not assignable to "Basic" (reportIncompatibleMethodOverride)
- ...:123:27 - error: Cannot access attribute "doit" for class "tuple[Unknown, ...]"
- Attribute "doit" is unknown (reportAttributeAccessIssue)
- Return type mismatch: base method returns type "Basic", override returns type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | Literal[0] | None"
+ Return type mismatch: base method returns type "Basic", override returns type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | Literal[0] | None"
- Type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | Literal[0] | None" is not assignable to type "Basic"
+ Type "Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | Literal[0] | None" is not assignable to type "Basic"
- ...:41:21 - error: Cannot access attribute "simplify" for class "tuple[Unknown, ...]"
- Attribute "simplify" is unknown (reportAttributeAccessIssue)
- ...:41:21 - error: "simplify" is not a known attribute of "None" (reportOptionalMemberAccess)
- ...:366:12 - error: Operator "-" not supported for types "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" and "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None"
+ ...:366:12 - error: Operator "-" not supported for types "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" and "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None"
- ...:414:21 - error: Argument of type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
+ ...:414:21 - error: Argument of type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
- Type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" is not assignable to type "Basic"
+ Type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Add | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" is not assignable to type "Basic"
... (truncated 1861 lines) ...
|
This file contains hidden or 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
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.
No description provided.