-
Notifications
You must be signed in to change notification settings - Fork 26
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
simplify hint diagnostics into a single separate diagnostic category and report all baselined diagnostics with it #845
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
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
DetachHead
force-pushed
the
hints
branch
2 times, most recently
from
November 3, 2024 06:39
fd5e7c2
to
956ae1d
Compare
This comment has been minimized.
This comment has been minimized.
…and report all baselined diagnostics with it
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
- Type of "P" is "(condition: Unknown, given_condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Any | BernoulliDistribution | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Piecewise | Basic | Equality | Lambda | Relational | Unequality | int | None)" (reportUnknownVariableType)
+ Type of "P" is "(condition: Unknown, given_condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Any | BernoulliDistribution | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Piecewise | Basic | Equality | Lambda | int | None)" (reportUnknownVariableType)
- Type of "E" is "(expr: Unknown, condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
+ Type of "E" is "(expr: Unknown, condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
- Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None)" (reportUnknownMemberType)
+ Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None)" (reportUnknownMemberType)
- Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None)" (reportUnknownMemberType)
+ Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:39:12 - error: Operator "-" not supported for types "Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None" and "Any | Unknown | Expr | int"
+ /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:39:12 - error: Operator "-" not supported for types "Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None" and "Any | Unknown | Expr | int"
- Operator "-" not supported for types "Equality" and "int"
- Operator "-" not supported for types "Relational" and "int"
- Operator "-" not supported for types "Unequality" and "int" (reportOperatorIssue)
+ Operator "-" not supported for types "Equality" and "int" (reportOperatorIssue)
- Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None)" (reportUnknownMemberType)
+ Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:39:37 - error: Operator "**" not supported for types "Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None" and "Literal[2]"
+ /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:39:37 - error: Operator "**" not supported for types "Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None" and "Literal[2]"
- Operator "**" not supported for types "Equality" and "Literal[2]"
- Operator "**" not supported for types "Relational" and "Literal[2]"
- Operator "**" not supported for types "Unequality" and "Literal[2]" (reportOperatorIssue)
+ Operator "**" not supported for types "Equality" and "Literal[2]" (reportOperatorIssue)
- Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None)" (reportUnknownMemberType)
+ Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None)" (reportUnknownMemberType)
- Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None)" (reportUnknownMemberType)
+ Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:69:12 - error: Operator "-" not supported for types "Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None" and "Any | Unknown | Expr | int"
+ /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:69:12 - error: Operator "-" not supported for types "Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None" and "Any | Unknown | Expr | int"
- Operator "-" not supported for types "Equality" and "int"
- Operator "-" not supported for types "Relational" and "int"
- Operator "-" not supported for types "Unequality" and "int" (reportOperatorIssue)
+ Operator "-" not supported for types "Equality" and "int" (reportOperatorIssue)
- Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None)" (reportUnknownMemberType)
+ Type of "expectation" is "(expr: Unknown, var: Unknown, evaluate: bool = True, **kwargs: Unknown) -> (Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:69:37 - error: Operator "**" not supported for types "Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None" and "Literal[2]"
+ /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:69:37 - error: Operator "**" not supported for types "Any | tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Piecewise | Basic | Equality | Literal[0] | None" and "Literal[2]"
- Operator "**" not supported for types "Equality" and "Literal[2]"
- Operator "**" not supported for types "Relational" and "Literal[2]"
- Operator "**" not supported for types "Unequality" and "Literal[2]" (reportOperatorIssue)
+ Operator "**" not supported for types "Equality" and "Literal[2]" (reportOperatorIssue)
- Type of "expand" is "Unknown | Any | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | Expr))" (reportUnknownMemberType)
+ Type of "expand" is "Unknown | Any | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | Self@Expr))" (reportUnknownMemberType)
- Type of "expand" is "((**hints: Unknown) -> (ZeroMatrix | VarianceMatrix | Unknown | Expr)) | ((**hints: Unknown) -> (Unknown | Variance | Expr)) | Unknown | Any | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | CentralMoment))" (reportUnknownMemberType)
+ Type of "expand" is "((**hints: Unknown) -> (ZeroMatrix | VarianceMatrix | Unknown | Expr)) | ((**hints: Unknown) -> (Unknown | Variance | Expr)) | Unknown | Any | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | Self@Expr))" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_discrete_rv.py:223:20 - error: Invalid conditional operand of type "_NotImplementedType | StrictLessThan | Unknown | Equality | Relational | Unequality"
+ Method __bool__ for type "StrictLessThan" returns type "NoReturn" rather than "bool"
... (truncated 805 lines) ...
AutoSplit (https://github.com/Toufool/AutoSplit): 297.50x slower (0.1s -> 16.4s in a single noisy sample)
|
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.