mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:09:22 +00:00
![]() * Generate fixes when using --show-fixes Example command: `cargo run --bin ruff -- --no-cache --select F401 --show-source --show-fixes crates/ruff/resources/test/fixtures/pyflakes/F401_9.py` Before, `--show-fixes` was ignored: ``` crates/ruff/resources/test/fixtures/pyflakes/F401_9.py:4:22: F401 [*] `foo.baz` imported but unused | 4 | __all__ = ("bar",) 5 | from foo import bar, baz | ^^^ F401 | = help: Remove unused import: `foo.baz` Found 1 error. [*] 1 potentially fixable with the --fix option. ``` After: ``` crates/ruff/resources/test/fixtures/pyflakes/F401_9.py:4:22: F401 [*] `foo.baz` imported but unused | 4 | __all__ = ("bar",) 5 | from foo import bar, baz | ^^^ F401 | = help: Remove unused import: `foo.baz` ℹ Suggested fix 1 1 | """Test: late-binding of `__all__`.""" 2 2 | 3 3 | __all__ = ("bar",) 4 |-from foo import bar, baz 4 |+from foo import bar Found 1 error. [*] 1 potentially fixable with the --fix option. ``` Also fixes git clone |
||
---|---|---|
.. | ||
benchmarks | ||
_utils.py | ||
add_plugin.py | ||
add_rule.py | ||
check_docs_formatted.py | ||
check_ecosystem.py | ||
Dockerfile.ecosystem | ||
generate_known_standard_library.py | ||
generate_mkdocs.py | ||
pyproject.toml | ||
transform_readme.py | ||
update_ambiguous_characters.py |