Skip to content
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 occasional error notification in the language server when reading notebook file contents from disk #1076

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

DetachHead
Copy link
Owner

No description provided.

@DetachHead DetachHead enabled auto-merge (rebase) February 13, 2025 14:45
@DetachHead DetachHead merged commit d0db5c4 into main Feb 13, 2025
20 checks passed
@DetachHead DetachHead deleted the fix-notebook-error branch February 13, 2025 15:09
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sympy (https://github.com/sympy/sympy)
-     Type of "rootof" is "(f: Unknown, x: Unknown, index: Unknown | None = None, radicals: bool = True, expand: bool = True) -> (Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr)" (reportUnknownVariableType)
+     Type of "rootof" is "(f: Unknown, x: Unknown, index: Unknown | None = None, radicals: bool = True, expand: bool = True) -> (Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Expr)" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:329:41 - warning: Return type of lambda, "list[Equality | Unknown] | list[Equality]", is partially unknown (reportUnknownLambdaType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:329:41 - warning: Return type of lambda, "list[Equality | Unknown | Relational | Unequality] | list[Equality]", is partially unknown (reportUnknownLambdaType)
-     Type of "sol" is "Equality | Unknown" (reportUnknownVariableType)
+     Type of "sol" is "Equality | Unknown | Relational | Unequality" (reportUnknownVariableType)
-     Type of "actual" is "list[Equality | Unknown]" (reportUnknownVariableType)
+     Type of "actual" is "list[Equality | Unknown | Relational | Unequality]" (reportUnknownVariableType)
-     Argument type is "list[Equality | Unknown]" (reportUnknownArgumentType)
+     Argument type is "list[Equality | Unknown | Relational | Unequality]" (reportUnknownArgumentType)
-     Type of "solns" is "list[Equality | Unknown]" (reportUnknownVariableType)
+     Type of "solns" is "list[Equality | Unknown | Relational | Unequality]" (reportUnknownVariableType)
-     Type of "eq" is "Equality | Unknown" (reportUnknownVariableType)
+     Type of "eq" is "Equality | Unknown | Relational | Unequality" (reportUnknownVariableType)
-     Type of "eq" is "Equality | Unknown" (reportUnknownVariableType)
+     Type of "eq" is "Equality | Unknown | Relational | Unequality" (reportUnknownVariableType)
-     Type of "eq" is "Equality | Unknown" (reportUnknownVariableType)
+     Type of "eq" is "Equality | Unknown | Relational | Unequality" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:635:5 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | list[Equality | Unknown]] | dict[str, Expr | Unknown | list[Equality | Unknown]] | dict[str, Expr | Unknown | list[Equality | Unknown] | list[str]] | dict[str, Expr | Unknown | list[Equality | Unknown] | bool] | dict[str, Derivative | list[Equality | Unknown]]]]", is partially unknown (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:635:5 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | Relational | Unequality | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality] | list[str]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality] | bool] | dict[str, Derivative | list[Equality | Unknown | Relational | Unequality]]]]", is partially unknown (reportUnknownParameterType)
-     Type of "r1" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr" (reportUnknownVariableType)
+     Type of "r1" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Expr" (reportUnknownVariableType)
-     Type of "r2" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr" (reportUnknownVariableType)
+     Type of "r2" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Expr" (reportUnknownVariableType)
-     Type of "r3" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr" (reportUnknownVariableType)
+     Type of "r3" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Expr" (reportUnknownVariableType)
-     Type of "r4" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr" (reportUnknownVariableType)
+     Type of "r4" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Expr" (reportUnknownVariableType)
-     Type of "r5" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr" (reportUnknownVariableType)
+     Type of "r5" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Expr" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:637:12 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | list[Equality | Unknown]] | dict[str, Expr | Unknown | list[Equality | Unknown]] | dict[str, Expr | Unknown | list[Equality | Unknown] | list[str]] | dict[str, Expr | Unknown | list[Equality | Unknown] | bool] | dict[str, Derivative | list[Equality | Unknown]]]]", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:637:12 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | Relational | Unequality | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality] | list[str]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality] | bool] | dict[str, Derivative | list[Equality | Unknown | Relational | Unequality]]]]", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:694:5 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | list[Equality | Unknown]] | dict[str, Expr | Unknown | list[Equality | Unknown]]]]", is partially unknown (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:694:5 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | Relational | Unequality | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality]]]]", is partially unknown (reportUnknownParameterType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:695:12 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | list[Equality | Unknown]] | dict[str, Expr | Unknown | list[Equality | Unknown]]]]", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:695:12 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | Relational | Unequality | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality]]]]", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:706:26 - warning: Argument type is Any
-     Argument corresponds to parameter "rhs" in function "__new__" (reportAny)
-     Argument corresponds to parameter "rhs" in function "__new__" (reportAny)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:716:26 - warning: Argument type is Any
-     Argument corresponds to parameter "rhs" in function "__new__" (reportAny)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:721:26 - warning: Argument type is Any
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:739:5 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | list[Equality | Unknown]] | dict[str, Expr | list[Equality | Unknown]] | dict[str, Expr | Unknown | list[Equality | Unknown]]]]", is partially unknown (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:739:5 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | Relational | Unequality | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality]]]]", is partially unknown (reportUnknownParameterType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:740:12 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | list[Equality | Unknown]] | dict[str, Expr | list[Equality | Unknown]] | dict[str, Expr | Unknown | list[Equality | Unknown]]]]", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/tests/test_single.py:740:12 - warning: Return type, "dict[str, str | Expr | dict[str, dict[str, Equality | Unknown | Relational | Unequality | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | list[Equality | Unknown | Relational | Unequality]] | dict[str, Expr | Unknown | list[Equality | Unknown | Relational | Unequality]]]]", is partially unknown (reportUnknownVariableType)

... (truncated 4089 lines) ...

pycryptodome (https://github.com/Legrandin/pycryptodome): 3.74x slower (8.8s -> 32.8s in a single noisy sample)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant