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

Pull Pylance with Pyright 1.1.392 #9715

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

bschnurr
Copy link
Member

No description provided.

This comment has been minimized.

@heejaechang heejaechang force-pushed the pull-pylance-with-pyright-1.1.392-20250115-224906 branch from bc04af2 to c7578ac Compare January 15, 2025 23:08
Copy link
Contributor

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/utilities/tests/test_matchpy_connector.py:120:18 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer" cannot be assigned to parameter "expr" of type "Expr" in function "add"
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:120:18 - error: Argument of type "Equality | Unknown" cannot be assigned to parameter "expr" of type "Expr" in function "add"
-     Type "Equality | Unknown | Relational | Unequality | Integer" is not assignable to type "Expr"
+     Type "Equality | Unknown" is not assignable to type "Expr"
-       "Relational" is not assignable to "Expr" (reportArgumentType)
+       "Equality" is not assignable to "Expr" (reportArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:123:18 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer" cannot be assigned to parameter "expr" of type "Expr" in function "add"
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:123:18 - error: Argument of type "Equality | Unknown" cannot be assigned to parameter "expr" of type "Expr" in function "add"
-     Type "Equality | Unknown | Relational | Unequality | Integer" is not assignable to type "Expr"
+     Type "Equality | Unknown" is not assignable to type "Expr"
-       "Relational" is not assignable to "Expr" (reportArgumentType)
+       "Equality" is not assignable to "Expr" (reportArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:126:9 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer" cannot be assigned to parameter "expr" of type "Expr" in function "add"
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:126:9 - error: Argument of type "Equality | Unknown" cannot be assigned to parameter "expr" of type "Expr" in function "add"
-     Type "Equality | Unknown | Relational | Unequality | Integer" is not assignable to type "Expr"
+     Type "Equality | Unknown" is not assignable to type "Expr"
-       "Relational" is not assignable to "Expr" (reportArgumentType)
+       "Equality" is not assignable to "Expr" (reportArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:132:9 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer" cannot be assigned to parameter "expr" of type "Expr" in function "add"
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:132:9 - error: Argument of type "Equality | Unknown" cannot be assigned to parameter "expr" of type "Expr" in function "add"
-     Type "Equality | Unknown | Relational | Unequality | Integer" is not assignable to type "Expr"
+     Type "Equality | Unknown" is not assignable to type "Expr"
-       "Relational" is not assignable to "Expr" (reportArgumentType)
+       "Equality" is not assignable to "Expr" (reportArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:895:12 - error: Operator "/" not supported for types "Equality | Unknown | Relational | Unequality | Integer" and "Literal[2]"
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:895:12 - error: Operator "/" not supported for types "Equality | Unknown" 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)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1863:12 - error: Cannot access attribute "combsimp" for class "Relational"
-     Attribute "combsimp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1863:12 - error: Cannot access attribute "combsimp" for class "Unequality"
-     Attribute "combsimp" is unknown (reportAttributeAccessIssue)
-     Attribute "factor" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1911:14 - error: Cannot access attribute "factor" for class "Relational"
-     Attribute "factor" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1911:14 - error: Cannot access attribute "factor" for class "Unequality"
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1918:14 - error: Cannot access attribute "combsimp" for class "Relational"
-     Attribute "combsimp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1918:14 - error: Cannot access attribute "combsimp" for class "Unequality"
-     Attribute "combsimp" is unknown (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1992:22 - error: Argument of type "Equality | Unknown | NaN | Sum" cannot be assigned to parameter "x" of type "ConvertibleToFloat" in function "__new__"
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1932:12 - error: Cannot access attribute "combsimp" for class "Relational"
-     Attribute "combsimp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1932:12 - error: Cannot access attribute "combsimp" for class "Unequality"
-     Attribute "combsimp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:1992:22 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer | NaN | Sum" cannot be assigned to parameter "x" of type "ConvertibleToFloat" in function "__new__"
-     Type "Equality | Unknown | Relational | Unequality | Integer | NaN | Sum" is not assignable to type "ConvertibleToFloat"
+     Type "Equality | Unknown | NaN | Sum" is not assignable to type "ConvertibleToFloat"
-       Type "Relational" is not assignable to type "ConvertibleToFloat"
+       Type "Equality" is not assignable to type "ConvertibleToFloat"
-         "Relational" is not assignable to "str"
+         "Equality" is not assignable to "str"
-         "Relational" is incompatible with protocol "Buffer"
+         "Equality" is incompatible with protocol "Buffer"
-         "Relational" is incompatible with protocol "SupportsFloat"
+         "Equality" is incompatible with protocol "SupportsFloat"
-         "Relational" is incompatible with protocol "SupportsIndex"
+         "Equality" is incompatible with protocol "SupportsIndex"
-     Attribute "gammasimp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:2074:56 - error: Cannot access attribute "gammasimp" for class "Relational"
-     Attribute "gammasimp" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:2074:56 - error: Cannot access attribute "gammasimp" for class "Unequality"
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:2973:37 - error: Operator "*" not supported for types "Literal[2]" and "Equality | Unknown | Relational | Unequality | Integer | NaN | Sum"
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:2973:37 - error: Operator "*" not supported for types "Literal[2]" and "Equality | Unknown | NaN | Sum"
-     Operator "*" not supported for types "Literal[2]" and "Equality"
-     Operator "*" not supported for types "Literal[2]" and "Relational"
-     Operator "*" not supported for types "Literal[2]" and "Unequality" (reportOperatorIssue)
+     Operator "*" not supported for types "Literal[2]" and "Equality" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:2978:17 - error: Operator "*" not supported for types "Literal[2]" and "Equality | Unknown | Relational | Unequality | Integer | NaN | Sum"
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_wester.py:2978:17 - error: Operator "*" not supported for types "Literal[2]" and "Equality | Unknown | NaN | Sum"
-     Operator "*" not supported for types "Literal[2]" and "Equality"
-     Operator "*" not supported for types "Literal[2]" and "Relational"
-     Operator "*" not supported for types "Literal[2]" and "Unequality" (reportOperatorIssue)
+     Operator "*" not supported for types "Literal[2]" and "Equality" (reportOperatorIssue)
+   /tmp/mypy_primer/projects/sympy/sympy/vector/implicitregion.py:114:20 - error: Operator "**" not supported for "None" (reportOptionalOperand)
+   /tmp/mypy_primer/projects/sympy/sympy/vector/implicitregion.py:114:28 - error: Operator "*" not supported for types "Literal[4]" and "One | Zero | Expr | Unknown | Any | None"
+     Operator "*" not supported for types "Literal[4]" and "None" (reportOperatorIssue)
-   /tmp/mypy_primer/projects/sympy/sympy/vector/implicitregion.py:128:16 - error: Argument of type "Unknown | FiniteSet | ConditionSet" cannot be assigned to parameter "obj" of type "Sized" in function "len"
+   /tmp/mypy_primer/projects/sympy/sympy/vector/implicitregion.py:128:16 - error: Argument of type "Unknown | FiniteSet | Set | Union | Intersection | Complement | ConditionSet" cannot be assigned to parameter "obj" of type "Sized" in function "len"
-     Type "Unknown | FiniteSet | ConditionSet" is not assignable to type "Sized"
+     Type "Unknown | FiniteSet | Set | Union | Intersection | Complement | ConditionSet" is not assignable to type "Sized"
-       "ConditionSet" is incompatible with protocol "Sized"
+       "Set" is incompatible with protocol "Sized"

... (truncated 56 lines) ...

@heejaechang
Copy link
Collaborator

diff from mypy primer doesn't look like due to this change.

@heejaechang heejaechang merged commit c87dd0b into main Jan 15, 2025
18 checks passed
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.

3 participants