We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$ cat foo.py #!/usr/bin/python3 try: from typing import Any, IO, Dict, Iterator, List, Optional, Tuple, Type, NamedTuple # noqa: F401 from types import TracebackType # noqa: F401 from argparse import Namespace # noqa: F401 Transaction = NamedTuple("Transaction", [("tid", int), ("dn", str), ("command", str)]) except ImportError: Transaction = namedtuple("Transaction", ["tid", "dn", "command"]) # type: ignore $ ruff --select UP014 --fix foo.py Found 1 error (1 fixed, 0 remaining). $ cat foo.py #!/usr/bin/python3 try: from typing import Any, IO, Dict, Iterator, List, Optional, Tuple, Type, NamedTuple # noqa: F401 from types import TracebackType # noqa: F401 from argparse import Namespace # noqa: F401 class Transaction(NamedTuple): tid: int dn: str command: str except ImportError: Transaction = namedtuple("Transaction", ["tid", "dn", "command"]) # type: ignore $ python3 foo.py File "foo.py", line 7 tid: int ^ IndentationError: expected an indented block
The text was updated successfully, but these errors were encountered:
Fixing, thank you.
Sorry, something went wrong.
For now, turning these fixes off when the code is indented. Will come back with a proper fix.
charliermarsh
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: