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 baseline when running in multithreaded/background analysis mode #702

Merged
merged 5 commits into from
Sep 27, 2024

Conversation

DetachHead
Copy link
Owner

fixes #700

@DetachHead DetachHead changed the title fix baseline when the lsp is running in multithreaded mode fix baseline when the running in multithreaded mode Sep 26, 2024
@DetachHead DetachHead changed the title fix baseline when the running in multithreaded mode fix baseline when running in multithreaded mode Sep 26, 2024

This comment has been minimized.

@DetachHead DetachHead changed the title fix baseline when running in multithreaded mode fix baseline when running in multithreaded/background analysis mode Sep 26, 2024

This comment has been minimized.

@DetachHead DetachHead force-pushed the fix-baseline-multithreaded branch from e44f35f to b1f6585 Compare September 26, 2024 14:23
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 "_get_const_characteristic_eq_sols" is "(r: Unknown, func: Unknown, order: Unknown) -> tuple[list[Unknown], list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]]]" (reportUnknownVariableType)
+     Type of "_get_const_characteristic_eq_sols" is "(r: Unknown, func: Unknown, order: Unknown) -> tuple[list[Unknown], list[tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]]]" (reportUnknownVariableType)
-     Type of "collectterms" is "list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]]" (reportUnknownVariableType)
+     Type of "collectterms" is "list[tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]]" (reportUnknownVariableType)
-     Type of "collectterms" is "list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]]" (reportUnknownVariableType)
+     Type of "collectterms" is "list[tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]]" (reportUnknownVariableType)
-     Type of "collectterms" is "list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]]" (reportUnknownVariableType)
+     Type of "collectterms" is "list[tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, Any, int] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, int]] | list[tuple[int, type[__class_UndefinedFunction] | Unknown, type[__class_UndefinedFunction] | Unknown] | tuple[int, type[__class_UndefinedFunction] | Unknown, int]]" (reportUnknownVariableType)
-     Type of "sqrtdenest" is "(expr: Unknown, max_iter: int = 3) -> Unknown" (reportUnknownVariableType)
+     Type of "sqrtdenest" is "(expr: Unknown, max_iter: int = 3) -> (Unknown | Mul | Pow | Order | Expr | Add | None)" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/subscheck.py:385:22 - error: Type of "simplify" is partially unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/subscheck.py:385:22 - error: Type of "simplify" is unknown (reportUnknownMemberType)
-     Type of "simplify" is "Unknown | ((**kwargs: Unknown) -> Unknown)" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/subscheck.py:385:37 - error: "simplify" is not a known attribute of "None" (reportOptionalMemberAccess)
-     Type of "_" is "Unknown | Any | Literal[False]" (reportUnknownVariableType)
+     Type of "_" is "Unknown | Literal[False]" (reportUnknownVariableType)
-     Type of "_" is "Unknown | Any | Literal[False]" (reportUnknownVariableType)
+     Type of "_" is "Unknown | Literal[False]" (reportUnknownVariableType)
-     Type of "_" is "Unknown | Any | Literal[False]" (reportUnknownVariableType)
+     Type of "_" is "Unknown | Literal[False]" (reportUnknownVariableType)
-     Type of "_" is "Unknown | Any | Literal[False]" (reportUnknownVariableType)
+     Type of "_" is "Unknown | Literal[False]" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:501:5 - error: Type of "eqs" is partially unknown
+     Type of "eqs" is "list[Unknown]" (reportUnknownVariableType)
-     Argument type is "Unknown | Any | _NotImplementedType" (reportUnknownArgumentType)
+     Argument type is "Unknown | _NotImplementedType" (reportUnknownArgumentType)
-     Type of "eqs" is "list[Unknown | Any]" (reportUnknownVariableType)
+     Type of "eqs" is "list[Unknown]" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:505:16 - error: Argument type is partially unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:505:16 - error: Argument type is unknown
-     Argument corresponds to parameter "iterable" in function "__init__"
+     Argument corresponds to parameter "iterable" in function "__init__" (reportUnknownArgumentType)
-     Argument type is "Unknown | Any" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:717:18 - error: Argument type is unknown
+     Argument corresponds to parameter "f" in function "solve" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:1768:5 - error: Type of "eqs" is partially unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:1768:5 - error: Type of "eqs" is unknown (reportUnknownVariableType)
-     Type of "eqs" is "Unknown | Any" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:1769:18 - error: Argument type is unknown
+     Argument corresponds to parameter "f" in function "solve" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:1770:18 - error: Argument type is unknown
+     Argument corresponds to parameter "f" in function "solve" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/tests/test_symbolic_multivariate.py:64:50 - error: Argument type is unknown
+     Argument corresponds to parameter "expr" in function "__new__" (reportUnknownArgumentType)
-     Type of "c" is "Unknown | Any | _NotImplementedType" (reportUnknownVariableType)
+     Type of "c" is "Unknown | _NotImplementedType" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_lambdify.py:634:29 - error: Argument type is unknown
+     Argument corresponds to parameter "expr" in function "lambdify" (reportUnknownArgumentType)
-     Type of "dot" is "(b: Unknown, hermitian: Unknown | None = None, conjugate_convention: Unknown | None = None) -> (Unknown | Any)" (reportUnknownMemberType)

... (truncated 17 lines) ...

spack (https://github.com/spack/spack)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin.mock/packages/root/package.py:14: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.mock/packages/root/package.py:14: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.mock/packages/root-adds-virtual/package.py:14: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.mock/packages/root-adds-virtual/package.py:14: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.mock/packages/shell-a/package.py:17: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.mock/packages/shell-a/package.py:17: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.mock/packages/simple-inheritance/package.py:10: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.mock/packages/simple-inheritance/package.py:10: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.mock/packages/simple-inheritance/package.py:11: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.mock/packages/simple-inheritance/package.py:11: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.mock/packages/simple-inheritance/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.mock/packages/simple-inheritance/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.mock/packages/singlevalue-variant-dependent/package.py:17: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.mock/packages/singlevalue-variant-dependent/package.py:17: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.mock/packages/singlevalue-variant-dependent-type/package.py:19: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.mock/packages/singlevalue-variant-dependent-type/package.py:19: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.mock/packages/sombrero/package.py:16: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.mock/packages/sombrero/package.py:16: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.mock/packages/splice-a/package.py:21: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.mock/packages/splice-a/package.py:21: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.mock/packages/splice-a/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.mock/packages/splice-a/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.mock/packages/splice-h/package.py:21: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.mock/packages/splice-h/package.py:21: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.mock/packages/splice-h/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.mock/packages/splice-h/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.mock/packages/splice-t/package.py:17: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.mock/packages/splice-t/package.py:17: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.mock/packages/splice-t/package.py:18: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.mock/packages/splice-t/package.py:18: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.mock/packages/splice-vh/package.py:21: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.mock/packages/splice-vh/package.py:21: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.mock/packages/splice-vh/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.mock/packages/splice-vh/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.mock/packages/sticky-variant-dependent/package.py:16: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.mock/packages/sticky-variant-dependent/package.py:16: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.mock/packages/test-dep-with-imposed-conditions/package.py:17: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 3 lines) ...

@DetachHead DetachHead merged commit 54ee1a1 into main Sep 27, 2024
19 checks passed
@DetachHead DetachHead deleted the fix-baseline-multithreaded branch September 27, 2024 12:42
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.

language server baseline functionality doesn't work when importStrategy is fromEnvironment
1 participant