Commit Graph

728 Commits

Author SHA1 Message Date
Charlie Marsh 080411bc89 Re-create ruff snapshots 2022-12-06 00:03:14 -05:00
Charlie Marsh 71543eeabc
Rename rules mod to ruff (#1104) 2022-12-05 23:35:36 -05:00
Charlie Marsh 44025f1c92
Improve F841's Flake8 parity for unpacking assignments (#1103) 2022-12-05 23:34:40 -05:00
Charlie Marsh 971bf6d232 Run cargo fmt 2022-12-05 23:01:47 -05:00
Charlie Marsh 0acc47386a
Use pyproject.toml parent as project root when explicitly provided (#1101) 2022-12-05 23:00:59 -05:00
Reiner Gerecke 982ac6b0ad
Auto-generate options in README from field attributes (#1015) 2022-12-05 22:34:40 -05:00
Charlie Marsh 541440f7a8
Re-support F841 detection for single context managers (#1099) 2022-12-05 22:09:45 -05:00
Charlie Marsh 66dde46e03
Track nested imports without column number detection (#1097) 2022-12-05 21:16:44 -05:00
Charlie Marsh 38ad10f60d
Treat nested classes and functions as "standard" siblings (#1095) 2022-12-05 20:45:12 -05:00
Charlie Marsh 88e78c5cde Add missing D415 fixture 2022-12-05 20:42:21 -05:00
Charlie Marsh 436aeed20a
Implement autofix for D400 and D415 (#1094) 2022-12-05 20:24:56 -05:00
Charlie Marsh b94169a8bb
Don't autofix D210 by introducing a syntax error (#1093) 2022-12-05 19:13:22 -05:00
Charlie Marsh f001305b2e
Only autofix D205 by deleting blank lines (#1091) 2022-12-05 19:01:32 -05:00
Charlie Marsh e88093541f
Avoid wrapping import-star statements (#1089) 2022-12-05 18:39:16 -05:00
Charlie Marsh 55b7ec8f85
Ignore newline enforcement when imports break indentation boundaries (#1085) 2022-12-05 18:02:41 -05:00
Charlie Marsh 4fbc1082de
Support isort: split directive (#1081) 2022-12-05 16:48:10 -05:00
Charlie Marsh cf2e887e38
Tweak summary message to include total error counts (#1067) 2022-12-05 16:12:12 -05:00
Charlie Marsh ee994e8c07
Import compatibility with `isort` newline-insertion behavior (#1078) 2022-12-05 16:07:07 -05:00
Charlie Marsh c69c4fd655
Support isort: skip_file directive (#1075) 2022-12-05 15:02:01 -05:00
Charlie Marsh 4be74785fe
Support unterminated isort: off directives (#1074) 2022-12-05 14:54:47 -05:00
Jonathan Plasse a76c5d1226
Add allowed-confusable settings (#1059) 2022-12-05 12:53:55 -05:00
Charlie Marsh 5aeddeb825
Include pyproject.toml path in error message (#1068) 2022-12-05 12:04:50 -05:00
Charlie Marsh 5f8294aea4
Preserve star imports when re-formatting import blocks (#1066) 2022-12-05 11:48:38 -05:00
Charlie Marsh e07d3f6313 Fix clippy 2022-12-05 11:47:42 -05:00
Charlie Marsh 55ce7bd0df
Migrate invalid_literal_comparisons fix to token-based logic (#1065) 2022-12-05 11:16:59 -05:00
Charlie Marsh e695f6eb25
Avoid false-positive on PLR1701 for multi-type isinstance calls (#1063) 2022-12-05 10:07:05 -05:00
messense fb2c457a9b
Upgrade to notify 5.0.0 (#1048) 2022-12-05 09:58:42 -05:00
Jeong YunWon 523cf62eda
Style fixes (#1049) 2022-12-05 09:57:48 -05:00
Charlie Marsh 871ac511ae
Add an option to force one-member-per-line for aliased import-froms (#1047) 2022-12-04 21:22:00 -05:00
Charlie Marsh 0685af8a4f
Update RustPython (#1045) 2022-12-04 20:09:28 -05:00
Charlie Marsh 76439235af
Remove unused imports in `__init__.py` files by default (#1042) 2022-12-04 14:45:54 -05:00
Charlie Marsh 46a99243cd
Fix D205 autofix by detecting summary line (#1041) 2022-12-04 13:56:51 -05:00
Jonathan Plasse 8f6b2fb32b
Extend and rename RUF004 to PLR1722 (#1036) 2022-12-04 10:20:12 -05:00
Charlie Marsh 1d61db5b62
Allow import builtins under T100 (#1037) 2022-12-04 10:13:17 -05:00
Charlie Marsh e15c0c68cb Fix PLW0120 snapshot 2022-12-04 10:10:00 -05:00
Harutaka Kawamura abb2adc4d8
Implement `useless-import-alias` (#1025) 2022-12-04 09:48:56 -05:00
Harutaka Kawamura e070166409
Implement useless-else-on-loop (#1031) 2022-12-04 09:22:04 -05:00
Harutaka Kawamura 21cace0973
Fix `PLR0402` (#1024) 2022-12-04 09:13:47 -05:00
Anders Kaseorg dbb1a6e44b
Remove sloppy match_name_or_attr helper (#1027) 2022-12-04 09:12:03 -05:00
Charlie Marsh ddae3586d5
Add support for combine-as-imports import formatting (#1022) 2022-12-04 00:11:48 -05:00
Charlie Marsh 97684b7215 Mark MisplacedComparisonConstant as fixable 2022-12-04 00:11:19 -05:00
Harutaka Kawamura 20e6ff112a
Implement `misplaced-comparison-constant` (#1023) 2022-12-04 00:10:07 -05:00
Charlie Marsh 6cb84d29f0
Rename M001 to RUF100 (#1021) 2022-12-03 22:51:05 -05:00
Charlie Marsh d069054792 Rename RUF101 fixtures 2022-12-03 22:47:16 -05:00
Charlie Marsh c659cb86d9
Rename RUF101 to RUF004 (#1020) 2022-12-03 22:46:13 -05:00
Charlie Marsh 8a3f29497b
Add backwards compatible redirect map for `U`-to-`UP` rename (#1019) 2022-12-03 22:43:00 -05:00
Harutaka Kawamura 58e7baedd0
Implement `consider-using-from-import` (#1018) 2022-12-03 22:36:43 -05:00
Charlie Marsh 00eff2b09a
Rename pyupgrade rules from UXXX to UPXXX (#957) 2022-12-03 22:35:42 -05:00
Charlie Marsh 87bdda3cfa
Make some `flake8-return` rules auto-fixable (#1017) 2022-12-03 20:13:17 -05:00
Charlie Marsh 291727a27d
Implement `flake8-return` plugin (#1016) 2022-12-03 20:12:11 -05:00