ruff/crates
Justin Prieto f012ed2d77
Add autofix for B004 (#5788)
## Summary

Adds autofix for `hasattr` case of B004. I don't think it's safe (or
simple) to implement it for the `getattr` case because, inter alia,
calling `getattr` may have side effects.

Fixes #3545

## Test Plan

Existing tests were sufficient. Updated snapshots
2023-07-16 01:32:21 +00:00
..
flake8_to_ruff Fix nested lists in CONTRIBUTING.md (#5721) 2023-07-13 16:32:59 +00:00
ruff Add autofix for B004 (#5788) 2023-07-16 01:32:21 +00:00
ruff_benchmark Create `PyFormatOptions` 2023-06-26 14:02:17 +02:00
ruff_cache Only use a single cache file per Python package (#5117) 2023-06-19 17:46:13 +02:00
ruff_cli Ignore Jupyter Notebooks for `--add-noqa` (#5727) 2023-07-13 13:26:47 +05:30
ruff_dev Fix `Options` section of rule docs (#5741) 2023-07-13 17:25:54 +00:00
ruff_diagnostics Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
ruff_formatter Remove `mode` from `BestFitting` 2023-07-11 14:19:26 +02:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
ruff_python_ast Remove lexer-based comment range detection (#5785) 2023-07-16 01:03:27 +00:00
ruff_python_formatter Respect magic trailing comma for set expression (#5782) 2023-07-15 16:40:38 +00:00
ruff_python_resolver Fix CI by downgrading to cargo insta 1.29.0 (#5589) 2023-07-08 14:54:49 +00:00
ruff_python_semantic Use `SmallVec#extend_from_slice` in lieu of `SmallVec#extend` (#5793) 2023-07-15 21:25:12 -04:00
ruff_python_stdlib [B006] Add `bytes` to immutable types (#5776) 2023-07-15 13:04:33 +00:00
ruff_python_whitespace Use shared `Cursor` across crates (#5715) 2023-07-12 21:09:27 +00:00
ruff_rustpython Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_textwrap Use consistent `Cargo.toml` metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_wasm [`pyupgrade`] Restore the `keep-runtime-typing` setting (#5470) 2023-07-03 02:11:31 +00:00