You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A minimal code snippet that reproduces the bug.
Create a t.pyi file with the following content:
fromtyping_extensionsimportdeprecated@deprecated("Function deprecated_func is deprecated. Use method new_func instead.")defdeprecated_func(self) ->None: ...
The command you invoked (e.g., ruff /path/to/file.py --fix), ideally including the --isolated flag.
$ # ruff generates an error
$ ruff check --select=PYI t.pyi --isolatedt.pyi:3:13: PYI053 [*] String and bytes literals longer than 50 characters are not permittedFound 1 error.[*] 1 fixable with the `--fix` option.
$ # While flake8-pyi does not
$ pip list | grep pyiflake8-pyi 24.1.0
$ flake8 --select=Y t.pyi
$ # Even worse, with --fix it removes the message
$ ruff check --select=PYI t.pyi --isolated --diff--- t.pyi+++ t.pyi@@ -1,4 +1,4 @@ from typing_extensions import deprecated-@deprecated("Function deprecated_func is deprecated. Use method new_func instead.")+@deprecated(...) def deprecated_func(self) -> None: ...Would fix 1 error.
The current Ruff settings (any relevant sections from your pyproject.toml): N/A
The current Ruff version (ruff --version): ruff 0.1.11
The text was updated successfully, but these errors were encountered:
This concerns
@deprecated
from PEP-702Create a
t.pyi
file with the following content:ruff /path/to/file.py --fix
), ideally including the--isolated
flag.pyproject.toml
): N/Aruff --version
):ruff 0.1.11
The text was updated successfully, but these errors were encountered: