-
Notifications
You must be signed in to change notification settings - Fork 38
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: include DiagnosticTag.Deprecated
for all severity levels of reportDeprecated
#1084
Merged
DetachHead
merged 4 commits into
DetachHead:main
from
disrupted:diag-deprecated-all-severity-lvl
Feb 18, 2025
Merged
fix: include DiagnosticTag.Deprecated
for all severity levels of reportDeprecated
#1084
DetachHead
merged 4 commits into
DetachHead:main
from
disrupted:diag-deprecated-all-severity-lvl
Feb 18, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eportDeprecated`
disrupted
commented
Feb 16, 2025
This comment has been minimized.
This comment has been minimized.
DetachHead
reviewed
Feb 18, 2025
…d at all if the client doesn't support diagnostic tags
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
- Type of "nthroot" is "(expr: Unknown, n: Unknown, max_len: int = 4, prec: int = 15) -> (Unknown | One | NegativeOne | Zero | Integer | Expr | Any | Self@Expr | Self@Add | Mul | Add | None)" (reportUnknownVariableType)
+ Type of "nthroot" is "(expr: Unknown, n: Unknown, max_len: int = 4, prec: int = 15) -> (Unknown | One | NegativeOne | Zero | Integer | Expr | Any | Self@Expr | Mul | Add | None)" (reportUnknownVariableType)
- Argument type is "tuple[Expr, dict[Unknown, Unknown]] | tuple[Unknown, dict[Dummy, Basic]]" (reportUnknownArgumentType)
+ Argument type is "tuple[Any, dict[Unknown, Unknown]] | tuple[Unknown, dict[Dummy, Unknown]]" (reportUnknownArgumentType)
- Type of "eq" is "Expr | Unknown" (reportUnknownVariableType)
+ Type of "eq" is "Any | Unknown" (reportUnknownVariableType)
- Type of "rep" is "dict[Unknown, Unknown] | dict[Dummy, Basic]" (reportUnknownVariableType)
+ Type of "rep" is "dict[Unknown, Unknown] | dict[Dummy, Unknown]" (reportUnknownVariableType)
- Type of "expand" is "(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 | Expr | Any)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_simplify.py:534:34 - error: Argument of type "dict[Unknown, Unknown] | dict[Dummy, Basic]" cannot be assigned to parameter "arg1" of type "Iterable[tuple[Basic | complex, Basic | complex]]" in function "subs"
+ /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_simplify.py:534:34 - error: Argument of type "dict[Unknown, Unknown] | dict[Dummy, Unknown]" cannot be assigned to parameter "arg1" of type "Iterable[tuple[Basic | complex, Basic | complex]]" in function "subs"
- Type "dict[Unknown, Unknown] | dict[Dummy, Basic]" is not assignable to type "Iterable[tuple[Basic | complex, Basic | complex]]"
+ Type "dict[Unknown, Unknown] | dict[Dummy, Unknown]" is not assignable to type "Iterable[tuple[Basic | complex, Basic | complex]]"
- "dict[Dummy, Basic]" is not assignable to "Iterable[tuple[Basic | complex, Basic | complex]]"
+ "dict[Dummy, Unknown]" is not assignable to "Iterable[tuple[Basic | complex, Basic | complex]]"
- Type of "expand" is "(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 | Expr | Any | Integral)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- Argument type is "Unknown | Expr | Any | Integral" (reportUnknownArgumentType)
+ Argument type is "Unknown | Expr | Any | Expr*" (reportUnknownArgumentType)
- Type of "expand" is "((**kwargs: Unknown) -> Equality) | 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 | Expr | Any | NaN)) | ((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 | Expr | Any | Sum))" (reportUnknownMemberType)
+ Type of "expand" is "((**kwargs: Unknown) -> Equality) | 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 | Expr | Any | Self@Expr))" (reportUnknownMemberType)
- Argument type is "Unknown | Expr | Any | NaN | Sum | Equality" (reportUnknownArgumentType)
+ Argument type is "Unknown | Expr | Any | Expr* | Equality" (reportUnknownArgumentType)
- /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_simplify.py:665:5 - warning: Type of "e3" is partially unknown
+ /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_simplify.py:665:5 - warning: Type of "e3" is unknown (reportUnknownVariableType)
- Type of "e3" is "Unknown | Expr | Any" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_simplify.py:668:5 - warning: Type of "s3" is unknown (reportUnknownVariableType)
- /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_simplify.py:668:19 - warning: Argument type is partially unknown
+ /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_simplify.py:668:19 - warning: Argument type is unknown
- Argument corresponds to parameter "expr" in function "simplify"
+ Argument corresponds to parameter "expr" in function "simplify" (reportUnknownArgumentType)
- Argument type is "Unknown | Expr | Any" (reportUnknownArgumentType)
- Type of "z" is "Unknown | Expr | Any" (reportUnknownVariableType)
+ Type of "z" is "Unknown | Expr | Any | Self@Expr" (reportUnknownVariableType)
- Type of "expand" is "(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 | Expr | Any)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- Type of "expand" is "(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 | Expr | Any)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- Type of "expand" is "(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 | Expr | Any)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- Type of "expand" is "(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 | Expr | Any)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- Type of "expand" is "(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 | Expr | Any)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- Type of "expand" is "(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 | Expr | Any)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- Type of "expand" is "(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 | Expr | Any)" (reportUnknownMemberType)
+ Type of "expand" is "(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 | Expr | Any | Self@Expr)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_sqrtdenest.py:123:5 - warning: Type of "z1" is unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/simplify/tests/test_sqrtdenest.py:123:5 - warning: Type of "z1" is partially unknown
... (truncated 5678 lines) ...
pyodide (https://github.com/pyodide/pyodide): 3.09x faster (14.9s -> 4.8s in a single noisy sample)
spack (https://github.com/spack/spack)
- /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/yara/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/yara/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/yara/package.py:23: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/yara/package.py:23: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/yara/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/yara/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/yara/package.py:26: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/yara/package.py:26: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/yara/package.py:27: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/yara/package.py:27: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/yara/package.py:28: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/yara/package.py:28: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/yara/package.py:29: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/yara/package.py:29: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/yarn/package.py:16: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/yarn/package.py:16: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/yasm/package.py:23: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/yasm/package.py:23: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/yasm/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/yasm/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/yasm/package.py:26: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/yasm/package.py:26: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/yasm/package.py:27: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/yasm/package.py:27: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/yasm/package.py:28: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/yasm/package.py:28: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/ycruncher/package.py:23: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/ycruncher/package.py:23: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/ycsb/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/ycsb/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/ycsb/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/ycsb/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/yoda/package.py:74: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/yoda/package.py:75: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/yoda/package.py:74: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/yoda/package.py:75: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/yoda/package.py:79: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 473 lines) ...
pywin32 (https://github.com/mhammond/pywin32): 4.18x slower (6.6s -> 27.6s in a single noisy sample)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #1081 (comment)