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: include DiagnosticTag.Deprecated for all severity levels of reportDeprecated #1084

Merged

Conversation

disrupted
Copy link
Contributor

Related to #1081 (comment)

This comment has been minimized.

@DetachHead DetachHead merged commit 8ed320e into DetachHead:main Feb 18, 2025
16 checks passed
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 "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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants