-
Notifications
You must be signed in to change notification settings - Fork 38
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
fix crash on invalid notebook files #1050
Merged
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
cb75c0b
to
986a544
Compare
This comment has been minimized.
This comment has been minimized.
986a544
to
ba0bb46
Compare
This comment has been minimized.
This comment has been minimized.
ba0bb46
to
37e23b0
Compare
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/solvers/diophantine/diophantine.py:10:46 - warning: Type of "igcd" is partially unknown
+ Type of "igcd" is "_lru_cache_wrapper[Unknown]" (reportUnknownVariableType)
- Type of "factor_list" is "(f: Unknown, ...) -> Unknown" (reportUnknownVariableType)
+ Type of "factor_list" is "(f: Unknown, ...) -> (tuple[ComplexInfinity | Rational | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown]] | tuple[ComplexInfinity | Rational | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown], list[tuple[Unknown, Unknown]] | list[Unknown]])" (reportUnknownVariableType)
- Type of "equation" is "Unknown | Expr | Any | Integer" (reportUnknownMemberType)
+ Type of "equation" is "Unknown | Expr | Any | Self@Expr" (reportUnknownMemberType)
- Type of "expand" is "(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 | Expr | Any | Integer)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- Type of "equation" is "Unknown | Expr | Any | Integer" (reportUnknownMemberType)
+ Type of "equation" is "Unknown | Expr | Any | Self@Expr" (reportUnknownMemberType)
- Type of "equation" is "Unknown | Expr | Any | Integer" (reportUnknownMemberType)
+ Type of "equation" is "Unknown | Expr | Any | Self@Expr" (reportUnknownMemberType)
- Type of "equation" is "Unknown | Expr | Any | Integer" (reportUnknownMemberType)
+ Type of "equation" is "Unknown | Expr | Any | Self@Expr" (reportUnknownMemberType)
- Type of "equation" is "Unknown | Expr | Any | Integer" (reportUnknownMemberType)
+ Type of "equation" is "Unknown | Expr | Any | Self@Expr" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:354:22 - warning: Argument type is unknown
+ Argument corresponds to parameter "object" in function "append" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:358:17 - warning: Type of "gcd" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:361:29 - warning: Argument type is unknown
+ Argument corresponds to parameter "object" in function "insert" (reportUnknownArgumentType)
- Type of "equation" is "Unknown | Expr | Any | Integer" (reportUnknownMemberType)
+ Type of "equation" is "Unknown | Expr | Any | Self@Expr" (reportUnknownMemberType)
- Argument type is "Unknown | Expr | Any | Integer" (reportUnknownArgumentType)
+ Argument type is "Unknown | Expr | Any | Expr*" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:551:17 - warning: Type of "g" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:552:17 - warning: Type of "a" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:553:17 - warning: Type of "c" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:556:29 - warning: Argument type is unknown
+ Argument corresponds to parameter "n" in function "isqrt" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:557:29 - warning: Argument type is unknown
+ Argument corresponds to parameter "n" in function "isqrt" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:561:21 - warning: Type of "eq" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:562:43 - warning: Argument type is unknown
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:567:33 - warning: Argument type is unknown
+ Argument corresponds to parameter "x" in function "int_valued" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:576:39 - warning: Argument type is unknown
+ Argument corresponds to parameter "a" in function "divisible" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:577:39 - warning: Argument type is unknown
+ Argument corresponds to parameter "a" in function "divisible" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:597:21 - warning: Type of "x_0" is partially unknown
+ Type of "x_0" is "ComplexInfinity | Rational | Unknown" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:598:21 - warning: Type of "y_0" is partially unknown
+ Type of "y_0" is "ComplexInfinity | Rational | Unknown" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:603:26 - warning: Type of "is_Integer" is partially unknown
+ Type of "is_Integer" is "bool | Unknown" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:603:45 - warning: Type of "is_Integer" is partially unknown
+ Type of "is_Integer" is "bool | Unknown" (reportUnknownMemberType)
- Type of "equation" is "Unknown | Expr | Any | Integer" (reportUnknownMemberType)
+ Type of "equation" is "Unknown | Expr | Any | Self@Expr" (reportUnknownMemberType)
- Argument type is "Unknown | Expr | Any | Integer" (reportUnknownArgumentType)
+ Argument type is "Unknown | Expr | Any | Expr*" (reportUnknownArgumentType)
- Type of "x_n" is "Unknown | ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr | None" (reportUnknownVariableType)
+ Type of "x_n" is "Unknown | ComplexInfinity | Rational | None" (reportUnknownVariableType)
- Type of "y_n" is "Unknown | ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr | None" (reportUnknownVariableType)
+ Type of "y_n" is "Unknown | ComplexInfinity | Rational | None" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:666:33 - warning: Type of "Xt" is partially unknown
+ Type of "Xt" is "ComplexInfinity | Rational | Unknown" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:667:33 - warning: Type of "Yt" is partially unknown
+ Type of "Yt" is "ComplexInfinity | Rational | Unknown" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1218:9 - warning: Type of "g" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1223:9 - warning: Type of "g" is unknown (reportUnknownVariableType)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1351:9 - warning: Type of "eq" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1351:9 - warning: Type of "eq" is partially unknown
+ Type of "eq" is "Unknown | Expr" (reportUnknownVariableType)
- Type of "as_expr" is "(*gens: Unknown) -> Unknown" (reportUnknownMemberType)
+ Type of "as_expr" is "(*gens: Unknown) -> (Unknown | Expr)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1352:16 - warning: Type of "is_polynomial" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1352:16 - warning: Type of "is_polynomial" is partially unknown
- /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1366:33 - warning: Argument type is unknown
- Argument corresponds to parameter "eq" in function "classify_diop" (reportUnknownArgumentType)
- Type of "terms" is "list[tuple[Unknown, int]]" (reportUnknownVariableType)
+ Type of "terms" is "list[tuple[Unknown | Expr, int]]" (reportUnknownVariableType)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1448:9 - warning: Type of "fl" is unknown (reportUnknownVariableType)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1448:26 - warning: Argument type is unknown
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1448:9 - warning: Type of "fl" is partially unknown
- Argument corresponds to parameter "f" in function "factor_list" (reportUnknownArgumentType)
+ Type of "fl" is "tuple[ComplexInfinity | Rational | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown]] | tuple[ComplexInfinity | Rational | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown], list[tuple[Unknown, Unknown]] | list[Unknown]]" (reportUnknownVariableType)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1449:12 - warning: Type of "is_Rational" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1449:12 - warning: Type of "is_Rational" is partially unknown
+ Type of "is_Rational" is "bool | Unknown | Any" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1450:32 - warning: Argument type is unknown
... (truncated 3848 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.
fixes #1048