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 logging in the language server printing upstream version number instead of the basedpyright version number #1080

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

DetachHead
Copy link
Owner

for #1077

fixes #636

@DetachHead DetachHead enabled auto-merge (rebase) February 14, 2025 08:33
@DetachHead DetachHead merged commit 75f51f1 into main Feb 14, 2025
20 checks passed
@DetachHead DetachHead deleted the fix-version branch February 14, 2025 08:54
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 "factor" is "(f: Unknown, ..., deep: bool = False) -> (Unknown | Expr | Add | Mul)" (reportUnknownVariableType)
+     Type of "factor" is "(f: Unknown, ..., deep: bool = False) -> (Unknown | Add | Expr | Mul)" (reportUnknownVariableType)
-     Type of "lcm" is "(f: Unknown, g: Unknown | None = None, ...) -> (Expr | Unknown | One | Poly | Any)" (reportUnknownVariableType)
+     Type of "lcm" is "(f: Unknown, g: Unknown | None = None, ...) -> (Expr | Unknown | One | Poly | Any | Rational | NaN | ComplexInfinity | NegativeOne | Zero | Integer | Half | Float)" (reportUnknownVariableType)
-     Type of "gcd" is "(f: Unknown, g: Unknown | None = None, ...) -> (Unknown | Zero | Poly | Any)" (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)
-     Type of "invert" is "(f: Unknown, g: Unknown, ...) -> Unknown" (reportUnknownVariableType)
+     Type of "invert" is "(f: Unknown, g: Unknown, ...) -> (Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Half | Expr | Float | Unknown | Poly)" (reportUnknownVariableType)
-     Type of "mu" is "Unknown | Expr | Any | ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType" (reportUnknownVariableType)
+     Type of "mu" is "Any | Unknown | Expr | ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType" (reportUnknownVariableType)
-     Argument type is "Unknown | Expr | Any | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType" (reportUnknownArgumentType)
+     Argument type is "Any | Unknown | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType" (reportUnknownArgumentType)
-     Type of "has" is "Unknown | ((*patterns: Unknown) -> bool) | Any" (reportUnknownMemberType)
+     Type of "has" is "Any | Unknown | ((*patterns: Unknown) -> bool)" (reportUnknownMemberType)
-     Type of "atoms" is "Unknown | Overload[() -> set[Basic], (*types: Tbasic@atoms | type[Tbasic@atoms]) -> set[Tbasic@atoms]] | Any" (reportUnknownMemberType)
+     Type of "atoms" is "Any | Unknown | Overload[() -> set[Basic], (*types: Tbasic@atoms | type[Tbasic@atoms]) -> set[Tbasic@atoms]]" (reportUnknownMemberType)
-     Type of "as_expr" is "(*gens: Unknown) -> Expr" (reportUnknownMemberType)
+     Type of "as_expr" is "(*gens: Unknown) -> Unknown" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solveset.py:1050:25 - warning: Argument type is unknown
+     Argument corresponds to parameter "rep" in function "__new__" (reportUnknownArgumentType)
-     Type of "decompogen" is "(f: Unknown, symbol: Unknown) -> (list[Expr] | list[Function | Pow] | list[Expr | Basic] | list[Function | Pow | Basic] | Unknown | list[Min | Max | Basic] | list[Unknown | Max | Min | Basic] | list[Basic] | list[Expr | Unknown | Basic] | list[Unknown | Poly | Basic] | list[Min | Max] | list[Unknown | Max | Min] | list[Expr | Unknown] | list[Unknown | Poly])" (reportUnknownVariableType)
+     Type of "decompogen" is "(f: Unknown, symbol: Unknown) -> (list[Expr] | list[Function | Pow] | list[Expr | Basic] | list[Function | Pow | Basic] | Unknown | list[Min | Max | Basic] | list[Unknown | Max | Min | Basic] | list[Basic] | list[Unknown | Poly | Basic] | list[Min | Max] | list[Unknown | Max | Min] | list[Unknown] | list[Unknown | Poly])" (reportUnknownVariableType)
-     Type of "g_s" is "list[Expr] | list[Function | Pow] | list[Expr | Basic] | list[Function | Pow | Basic] | Unknown | list[Min | Max | Basic] | list[Unknown | Max | Min | Basic] | list[Basic] | list[Expr | Unknown | Basic] | list[Unknown | Poly | Basic] | list[Min | Max] | list[Unknown | Max | Min] | list[Expr | Unknown] | list[Unknown | Poly]" (reportUnknownVariableType)
+     Type of "g_s" is "list[Expr] | list[Function | Pow] | list[Expr | Basic] | list[Function | Pow | Basic] | Unknown | list[Min | Max | Basic] | list[Unknown | Max | Min | Basic] | list[Basic] | list[Unknown | Poly | Basic] | list[Min | Max] | list[Unknown | Max | Min] | list[Unknown] | list[Unknown | Poly]" (reportUnknownVariableType)
-     Type of "neweq" is "Unknown | Expr | Add | Mul" (reportUnknownVariableType)
+     Type of "neweq" is "Unknown | Add | Expr | Mul" (reportUnknownVariableType)
-     Type of "as_expr" is "(*gens: Unknown) -> Expr" (reportUnknownMemberType)
+     Type of "as_expr" is "(*gens: Unknown) -> Unknown" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solveset.py:3801:31 - warning: Argument type is unknown
+     Argument corresponds to parameter "object" in function "append" (reportUnknownArgumentType)
-     Type of "factor_list" is "(f: Unknown, ...) -> (tuple[ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown]] | tuple[ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown], list[tuple[Unknown, Unknown]] | list[Unknown]])" (reportUnknownVariableType)
+     Type of "factor_list" is "(f: Unknown, ...) -> Unknown" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:838:36 - warning: Argument type is unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1351:9 - warning: Type of "eq" is unknown (reportUnknownVariableType)
-     Type of "as_expr" is "(*gens: Unknown) -> Expr" (reportUnknownMemberType)
+     Type of "as_expr" is "(*gens: Unknown) -> 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:1352:16 - warning: Type of "is_polynomial" is unknown (reportUnknownMemberType)
-     Type of "is_polynomial" is "(*syms: Unknown) -> (bool | None)" (reportUnknownMemberType)
+   /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)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1448:9 - warning: Type of "fl" is partially unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1444:13 - warning: Type of "terms" is partially unknown
-     Type of "fl" is "tuple[ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown]] | tuple[ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown], list[tuple[Unknown, Unknown]] | list[Unknown]]" (reportUnknownVariableType)
+     Type of "terms" is "list[tuple[Unknown, 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
+     Argument corresponds to parameter "f" in function "factor_list" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1449:12 - warning: Type of "is_Rational" is partially unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1449:12 - warning: Type of "is_Rational" is unknown (reportUnknownMemberType)
-     Type of "is_Rational" is "bool | Any | Unknown" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1450:32 - warning: Argument type is unknown
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1451:9 - warning: Type of "terms" is partially unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1451:9 - warning: Type of "terms" is unknown (reportUnknownVariableType)
-     Type of "terms" is "list[tuple[Unknown, Unknown]] | list[Unknown]" (reportUnknownVariableType)
-     Type of "term" is "tuple[Expr, int] | tuple[Unknown, Unknown] | Unknown" (reportUnknownVariableType)
+     Type of "term" is "tuple[Unknown, int] | Unknown" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1457:9 - warning: Type of "base" is partially unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1457:9 - warning: Type of "base" is unknown (reportUnknownVariableType)
-     Type of "base" is "Expr | Unknown" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1458:43 - warning: Argument type is unknown
+     Argument corresponds to parameter "eq" in function "classify_diop" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/diophantine/diophantine.py:1459:28 - warning: Argument type is unknown
+     Argument corresponds to parameter "expr" in function "signsimp" (reportUnknownArgumentType)

... (truncated 6202 lines) ...

comtypes (https://github.com/enthought/comtypes): 4.46x slower (5.0s -> 22.4s in a single noisy sample)

spack (https://github.com/spack/spack)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/ziatest/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/ziatest/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/ziatest/package.py:21: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/ziatest/package.py:21: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/zig/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/zig/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/zig/package.py:25: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/zig/package.py:25: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/zig/package.py:34: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/zig/package.py:34: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/zig/package.py:35: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/zig/package.py:35: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/zig/package.py:36: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/zig/package.py:36: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/zig/package.py:37: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/zig/package.py:37: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/zig/package.py:38: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/zig/package.py:38: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/zig/package.py:40: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/zig/package.py:40: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/zig/package.py:41: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/zig/package.py:41: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: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)

... (truncated 627 lines) ...

pycryptodome (https://github.com/Legrandin/pycryptodome): 3.19x faster (25.5s -> 8.0s 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
1 participant