Skip to content

Conversation

…both the language server and cli to the class and fix some bugs with the automatic baseline updating

This comment has been minimized.

This comment has been minimized.

@DetachHead DetachHead merged commit de76209 into main Oct 2, 2024
38 of 39 checks passed
@DetachHead DetachHead deleted the baseline-refactor branch October 2, 2024 10:07
Copy link
Contributor

github-actions bot commented Oct 2, 2024

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

sympy (https://github.com/sympy/sympy)
-     Type of "expand" is "Unknown | ((**kwargs: Unknown) -> Equality) | ((**kwargs: Unknown) -> Relational) | ((**kwargs: Unknown) -> Unequality) | ((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 | Integral))" (reportUnknownMemberType)
+     Type of "expand" is "Unknown | ((**kwargs: Unknown) -> Equality) | ((**kwargs: Unknown) -> Relational) | ((**kwargs: Unknown) -> Unequality) | ((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)
-     Argument type is "Unknown | Order | Any | Integral | Equality | Relational | Unequality" (reportUnknownArgumentType)
+     Argument type is "Unknown | Order | Any | Self@Expr | Equality | Relational | Unequality" (reportUnknownArgumentType)
-     Type of "expand" is "((**kwargs: Unknown) -> Equality) | Unknown | ((**kwargs: Unknown) -> Relational) | ((**kwargs: Unknown) -> Unequality) | ((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 | Sum))" (reportUnknownMemberType)
+     Type of "expand" is "((**kwargs: Unknown) -> Equality) | Unknown | ((**kwargs: Unknown) -> Relational) | ((**kwargs: Unknown) -> Unequality) | ((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)
-     Argument type is "Unknown | Order | Any | Sum | Equality | Relational | Unequality" (reportUnknownArgumentType)
+     Argument type is "Unknown | Order | Any | Self@Expr | Equality | Relational | Unequality" (reportUnknownArgumentType)
-     Type of "e" is "_NotImplementedType | Unknown" (reportUnknownVariableType)
+     Type of "e" is "_NotImplementedType | StrictLessThan | Unknown | Equality | Relational | Unequality" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_sqrtdenest.py:123:5 - error: Type of "z1" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_sqrtdenest.py:123:5 - error: Type of "z1" is partially unknown
+     Type of "z1" is "Unknown | Mul | Pow | Order | Expr | Add | None" (reportUnknownVariableType)
-     Type of "expand" is "Unknown | ((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))" (reportUnknownMemberType)
+     Type of "expand" is "Unknown | ((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 "i_part" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "i_part" is "Unknown | Order | Any | Self@Expr" (reportUnknownVariableType)
-     Type of "expand" is "Unknown | ((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)) | Any" (reportUnknownMemberType)
+     Type of "expand" is "Unknown | ((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)) | Any" (reportUnknownMemberType)
-     Type of "ivl" is "Any | Unknown" (reportUnknownVariableType)
+     Type of "ivl" is "Unknown | Any" (reportUnknownVariableType)
-     Type of "as_set" is "Any | Unknown" (reportUnknownMemberType)
+     Type of "as_set" is "Any | (() -> Unknown) | Unknown" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:21 - error: Type of "b" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:21 - error: Type of "b" is partially unknown
+     Type of "b" is "Mul | Unknown | Integer | Expr" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:24 - error: Type of "e" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:24 - error: Type of "e" is partially unknown
+     Type of "e" is "Unknown | Expr | Mul | None" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:28 - error: Type of "as_base_exp" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:28 - error: Type of "as_base_exp" is partially unknown
+     Type of "as_base_exp" is "Unknown | (() -> (tuple[Mul, Unknown] | tuple[Mul, Expr | None])) | (() -> (tuple[Unknown | Integer, Unknown | Mul] | tuple[Expr, Expr])) | (() -> tuple[Expr, Expr])" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:44 - error: "as_base_exp" is not a known attribute of "None" (reportOptionalMemberAccess)
-     Type of "check" is "list[Unknown]" (reportUnknownVariableType)
+     Type of "check" is "list[Unknown | Mul | Pow | Order | Expr | Add | None]" (reportUnknownVariableType)
-     Type of "extend" is "(iterable: Iterable[Unknown], /) -> None" (reportUnknownMemberType)
+     Type of "extend" is "(iterable: Iterable[Unknown | Mul | Pow | Order | Expr | Add | None], /) -> None" (reportUnknownMemberType)
-     Type of "extend" is "(iterable: Iterable[Unknown], /) -> None" (reportUnknownMemberType)
+     Type of "extend" is "(iterable: Iterable[Unknown | Mul | Pow | Order | Expr | Add | None], /) -> None" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2793:21 - error: Type of "s" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2793:21 - error: Type of "s" is partially unknown
+     Type of "s" is "Unknown | Mul | Pow | Order | Expr | Add | None" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2794:44 - error: Argument type is unknown
-     Argument corresponds to parameter "sol" in function "checksol" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2798:36 - error: Argument type is unknown
-     Argument corresponds to parameter "object" in function "append" (reportUnknownArgumentType)
-     Type of "g" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "g" is "Unknown | Order | Any | Self@Expr" (reportUnknownVariableType)
-     Type of "h" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "h" is "Unknown | Order | Any | Self@Expr" (reportUnknownVariableType)
-     Type of "expand" is "Unknown | ((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))" (reportUnknownMemberType)
+     Type of "expand" is "Unknown | ((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 "Unknown | ((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))" (reportUnknownMemberType)
+     Type of "expand" is "Unknown | ((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 "g" is "Unknown | Order | Basic | Any" (reportUnknownVariableType)
+     Type of "g" is "Unknown | Order | Basic | Self@Expr | Any" (reportUnknownVariableType)
-     Type of "h" is "Unknown | Order | Basic | Any" (reportUnknownVariableType)
+     Type of "h" is "Unknown | Order | Basic | Self@Expr | Any" (reportUnknownVariableType)
-     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any" (reportUnknownMemberType)
+     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any | ((...) -> (Unknown | Self@Expr | Basic))" (reportUnknownMemberType)
-     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any" (reportUnknownMemberType)
+     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any | ((...) -> (Unknown | Self@Expr | Basic))" (reportUnknownMemberType)
-     Type of "g" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "g" is "Unknown | Order | Any | Self@Expr" (reportUnknownVariableType)
-     Type of "h" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "h" is "Unknown | Order | Any | Self@Expr" (reportUnknownVariableType)

... (truncated 470 lines) ...

spack (https://github.com/spack/spack)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib/package.py:55:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib/package.py:55:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib/package.py:56:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib/package.py:56:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib-ng/package.py:29:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib-ng/package.py:29:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib-ng/package.py:30:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib-ng/package.py:30:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib-ng/package.py:51:9 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib-ng/package.py:51:9 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib-ng/package.py:52:9 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zlib-ng/package.py:52:9 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:31:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:31:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:32:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:32:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:33:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:33:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:45:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:45:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:47:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:47:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:48:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:48:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:49:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:49:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:50:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:50:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:52:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:52:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:53:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:53:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:54:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:54:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:55:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zoltan/package.py:55:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zookeeper/package.py:22:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zookeeper/package.py:22:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)

... (truncated 8 lines) ...

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