-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update fix summary message in
check --diff
to include unsafe fix hi…
…nts (#7790) Requires #7769 Updates the CLI display for `ruff check --fix` to hint availability of unsafe fixes. ``` ❯ ruff check example.py --select F601,T201 --diff --no-cache No errors fixed (1 fix available with `--unsafe-fixes`). ``` ``` ❯ ruff check example.py --select F601,T201,W292 --diff --no-cache --- example.py +++ example.py @@ -1,2 +1,2 @@ x = {'a': 1, 'a': 1} -print(('foo')) +print(('foo')) \ No newline at end of file Would fix 1 error (1 additional fix available with `--unsafe-fixes`). ``` ``` ❯ ruff check example.py --select F601,T201,W292 --diff --no-cache --unsafe-fixes --- example.py +++ example.py @@ -1,2 +1,2 @@ -x = {'a': 1} -print(('foo')) +x = {'a': 1, 'a': 1} +print(('foo')) \ No newline at end of file Would fix 2 errors. ```
- Loading branch information
Showing
2 changed files
with
136 additions
and
66 deletions.
There are no files selected for viewing
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
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