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

feat: add server info #1077

Merged
merged 1 commit into from
Feb 14, 2025
Merged

Conversation

disrupted
Copy link
Contributor

Fixes #1022

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 "classify_diop" is "(eq: Unknown, _dict: bool = True) -> tuple[Unknown | list[Unknown], dict[Unknown, Unknown] | Unknown, str]" (reportUnknownVariableType)
+     Type of "classify_diop" is "(eq: Unknown, _dict: bool = True) -> tuple[Unknown | list[Basic], dict[Unknown, int] | defaultdict[Unknown, int] | Any | Unknown, str]" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:60:31 - warning: Return type of lambda, "tuple[Unknown | list[Unknown], dict[Unknown, Unknown] | Unknown, str]", is partially unknown (reportUnknownLambdaType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:60:31 - warning: Return type of lambda, "tuple[Unknown | list[Basic], dict[Unknown, int] | defaultdict[Unknown, int] | Any | Unknown, str]", is partially unknown (reportUnknownLambdaType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:61:32 - warning: Return type of lambda, "tuple[Unknown | list[Unknown], dict[Unknown, Unknown] | Unknown, str]", is partially unknown (reportUnknownLambdaType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:61:32 - warning: Return type of lambda, "tuple[Unknown | list[Basic], dict[Unknown, int] | defaultdict[Unknown, int] | Any | Unknown, str]", is partially unknown (reportUnknownLambdaType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:62:41 - warning: Return type of lambda, "tuple[Unknown | list[Unknown], dict[Unknown, Unknown] | Unknown, str]", is partially unknown (reportUnknownLambdaType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:62:41 - warning: Return type of lambda, "tuple[Unknown | list[Basic], dict[Unknown, int] | defaultdict[Unknown, int] | Any | Unknown, str]", is partially unknown (reportUnknownLambdaType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:63:41 - warning: Return type of lambda, "tuple[Unknown | list[Unknown], dict[Unknown, Unknown] | Unknown, str]", is partially unknown (reportUnknownLambdaType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:63:41 - warning: Return type of lambda, "tuple[Unknown | list[Basic], dict[Unknown, int] | defaultdict[Unknown, int] | Any | Unknown, str]", is partially unknown (reportUnknownLambdaType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:623:41 - warning: Return type of lambda, "tuple[Unknown | list[Unknown], dict[Unknown, Unknown] | Unknown, str]", is partially unknown (reportUnknownLambdaType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:623:41 - warning: Return type of lambda, "tuple[Unknown | list[Basic], dict[Unknown, int] | defaultdict[Unknown, int] | Any | Unknown, str]", is partially unknown (reportUnknownLambdaType)
-     Type of "gcd" is "(f: Unknown, g: Unknown | None = None, ...) -> (Unknown | Any | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Half | Float | Poly)" (reportUnknownVariableType)
+     Type of "gcd" is "(f: Unknown, g: Unknown | None = None, ...) -> (Any | Unknown | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Half | Expr | Float | Poly)" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:51:13 - warning: Type of "eq" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:51:13 - warning: Type of "eq" is partially unknown
+     Type of "eq" is "Unknown | Expr | Any" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:52:25 - warning: Argument type is unknown
-     Argument corresponds to parameter "expr" in function "collect" (reportUnknownArgumentType)
-     Type of "k" is "Unknown | Any | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Half | Float | Poly" (reportUnknownVariableType)
+     Type of "k" is "Any | Unknown | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Half | Expr | Float | Poly" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:186:27 - warning: Argument type is unknown
-     Argument corresponds to parameter "expr" in function "collect" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:231:5 - warning: Return type, "Equality | Unknown | Relational | Unequality | Integer | None", is partially unknown (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:231:5 - warning: Return type, "Equality | Unknown | None", is partially unknown (reportUnknownParameterType)
-     Type of "sol" is "Equality | Unknown | Relational | Unequality | Integer" (reportUnknownVariableType)
+     Type of "sol" is "Equality | Unknown" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:268:20 - warning: Return type, "Equality | Unknown | Relational | Unequality | Integer", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:268:20 - warning: Return type, "Equality | Unknown", is partially unknown (reportUnknownVariableType)
-     Type of "sol" is "Equality | Unknown | Relational | Unequality | Integer" (reportUnknownVariableType)
+     Type of "sol" is "Equality | Unknown" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:272:12 - warning: Return type, "Equality | Unknown | Relational | Unequality | Integer | None", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/hypergeometric.py:272:12 - warning: Return type, "Equality | Unknown | None", is partially unknown (reportUnknownVariableType)
-     Type of "div" is "(f: Unknown, g: Unknown, ...) -> tuple[Unknown, Unknown]" (reportUnknownVariableType)
+     Type of "div" is "(f: Unknown, g: Unknown, ...) -> (tuple[Unknown, Unknown] | tuple[Unknown | Poly, Unknown | Poly])" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:54:5 - warning: Return type, "list[Equality | Unknown | Relational | Unequality | Integer] | None", is partially unknown (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:54:5 - warning: Return type, "list[Equality | Unknown] | None", is partially unknown (reportUnknownParameterType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:111:32 - warning: Return type, "list[Equality | Unknown | Relational | Unequality | Integer]", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:111:32 - warning: Return type, "list[Equality | Unknown]", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:115:24 - warning: Return type, "list[Equality | Unknown | Relational | Unequality | Integer]", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:115:24 - warning: Return type, "list[Equality | Unknown]", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:118:24 - warning: Return type, "list[Equality | Unknown | Relational | Unequality | Integer]", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:118:24 - warning: Return type, "list[Equality | Unknown]", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:122:16 - warning: Return type, "list[Equality | Unknown | Relational | Unequality | Integer]", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:122:16 - warning: Return type, "list[Equality | Unknown]", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:126:5 - warning: Return type, "list[Equality | Unknown | Relational | Unequality | Integer] | None", is partially unknown (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:126:5 - warning: Return type, "list[Equality | Unknown] | None", is partially unknown (reportUnknownParameterType)
-     Type of "sol" is "list[Equality | Unknown | Relational | Unequality | Integer] | None" (reportUnknownVariableType)
+     Type of "sol" is "list[Equality | Unknown] | None" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:158:20 - warning: Return type, "list[Equality | Unknown | Relational | Unequality | Integer]", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:158:20 - warning: Return type, "list[Equality | Unknown]", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:159:12 - warning: Return type, "list[Equality | Unknown | Relational | Unequality | Integer] | None", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/lie_group.py:159:12 - warning: Return type, "list[Equality | Unknown] | None", is partially unknown (reportUnknownVariableType)
-     Type of "polyy" is "dict[tuple[int], Unknown] | dict[Unknown, Unknown] | dict[tuple[int, ...], Any]" (reportUnknownVariableType)
+     Type of "polyy" is "Unknown | dict[tuple[int, ...], Any] | dict[Unknown, Unknown]" (reportUnknownVariableType)

... (truncated 5297 lines) ...

spack (https://github.com/spack/spack)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zip/package.py:20:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zip/package.py:20:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zip/package.py:22:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zip/package.py:22:5 - warning: Result of call expression is of type "((pkg: type[PackageBase]) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zipkin/package.py:24:5 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/zipkin/package.py:24:5 - warning: Result of call expression is of type "((pkg: type[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:54:5 - warning: Result of call expression is of type "(pkg: type[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:54:5 - warning: Result of call expression is of type "((pkg: type[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 - warning: Result of call expression is of type "(pkg: type[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 - warning: Result of call expression is of type "((pkg: type[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:32:5 - warning: Result of call expression is of type "(pkg: type[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:32:5 - warning: Result of call expression is of type "((pkg: type[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:33:5 - warning: Result of call expression is of type "(pkg: type[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:33:5 - warning: Result of call expression is of type "((pkg: type[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:54:9 - warning: Result of call expression is of type "(pkg: type[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:54:9 - warning: Result of call expression is of type "((pkg: type[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:55:9 - warning: Result of call expression is of type "(pkg: type[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:55:9 - warning: Result of call expression is of type "((pkg: type[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:30:5 - warning: Result of call expression is of type "(pkg: type[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:30:5 - warning: Result of call expression is of type "((pkg: type[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 - warning: Result of call expression is of type "(pkg: type[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 - warning: Result of call expression is of type "((pkg: type[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 - warning: Result of call expression is of type "(pkg: type[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 - warning: Result of call expression is of type "((pkg: type[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:44:5 - warning: Result of call expression is of type "(pkg: type[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:44:5 - warning: Result of call expression is of type "((pkg: type[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:46:5 - warning: Result of call expression is of type "(pkg: type[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:46:5 - warning: Result of call expression is of type "((pkg: type[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 - warning: Result of call expression is of type "(pkg: type[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 - warning: Result of call expression is of type "((pkg: type[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 - warning: Result of call expression is of type "(pkg: type[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 - warning: Result of call expression is of type "((pkg: type[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 - warning: Result of call expression is of type "(pkg: type[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 - warning: Result of call expression is of type "((pkg: type[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:51:5 - warning: Result of call expression is of type "(pkg: type[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:51:5 - warning: Result of call expression is of type "((pkg: type[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 - warning: Result of call expression is of type "(pkg: type[PackageBase]) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)

... (truncated 605 lines) ...

arviz (https://github.com/arviz-devs/arviz): 2.63x slower (13.5s -> 35.4s in a single noisy sample)

@DetachHead
Copy link
Owner

thanks for the contribution. it looks like the version value is incorrect though due to #636. i'll see if i can fix that

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.

[LSP Spec] serverInfo missing from initializeResult call
2 participants