Martin Fischer
31d00936ee
Drop no- from no-unnecessary-* rule names
2023-02-11 12:05:17 -05:00
Martin Fischer
c3c5d9a852
Rename nested-if-statements to collapsible-if
2023-02-11 12:05:17 -05:00
Martin Fischer
7e5c19385c
Rename return-bool-condition-directly to needless-bool
2023-02-11 12:05:17 -05:00
Charlie Marsh
24faabf1f4
Bump version to 0.0.245
2023-02-10 22:15:27 -05:00
Charlie Marsh
9fd29e2c54
Mention default in relative-imports doc
2023-02-10 22:12:22 -05:00
Simon Brugman
e83ed0ecba
Implement autofix for relative imports (TID252) ( #2739 )
2023-02-10 22:05:47 -05:00
Charlie Marsh
dadbfea497
Flag private member accesses on calls et al ( #2753 )
2023-02-10 19:23:22 -05:00
Nick Pope
9f84c497f9
Adjust heading level in rule documentation ( #2749 )
2023-02-10 19:10:42 -05:00
Martin Fischer
0ec25d1514
Rename dynamically-typed-expression to any-type ( #2751 )
2023-02-10 19:02:31 -05:00
Charlie Marsh
6a87c99004
Use explicit fields for implicit-namespace-package
2023-02-10 18:09:30 -05:00
Charlie Marsh
c8f60c9588
Improve implicit-namespace-package documentation
2023-02-10 18:06:48 -05:00
Charlie Marsh
113610a8d4
Improve hardcoded-sql-expression documentation
2023-02-10 18:03:01 -05:00
Charlie Marsh
6376e5915e
Improve dynamically-typed-expression documentation
2023-02-10 17:55:26 -05:00
Charlie Marsh
3d8fb5be20
Rewrite documentation for yield-in-init ( #2748 )
2023-02-10 17:49:55 -05:00
Charlie Marsh
0040991778
Respect NO_COLOR flags in --show-source ( #2750 )
2023-02-10 17:27:40 -05:00
Charlie Marsh
6eb9268675
Allow named unicodes in bidirectional escape check ( #2710 )
2023-02-10 16:59:28 -05:00
Charlie Marsh
e5f5142e3e
Improve yield-in-init documentation
2023-02-10 16:47:44 -05:00
Charlie Marsh
98d5ffb817
Fix __init__.py-to-__init__ in documentation
2023-02-10 16:30:36 -05:00
Charlie Marsh
3f20f73413
Use function_type::classify
for yield-in-init
( #2742 )
2023-02-10 16:19:45 -05:00
tomecki
a5e42d2f7c
pylint: E0100 yield-in-init ( #2716 )
2023-02-10 16:15:15 -05:00
Charlie Marsh
0bc1f68111
Only trigger compound statements after select keywords ( #2737 )
2023-02-10 15:21:06 -05:00
Charlie Marsh
d2b09d77c5
Only validate __all__
bindings for global scope ( #2738 )
2023-02-10 15:16:21 -05:00
Charlie Marsh
0377834f9f
Mark __all__
members as used at end-of-scope ( #2733 )
2023-02-10 14:32:05 -05:00
Charlie Marsh
3d650f9dd6
Relax conditions in bad-string-format-type ( #2731 )
2023-02-10 14:25:59 -05:00
Charlie Marsh
a72590ecde
Expand S110 and S112 ranges to include entire exception handler ( #2729 )
2023-02-10 13:27:18 -05:00
Charlie Marsh
812b227334
Avoid flagging typed exceptions in tuples ( #2728 )
2023-02-10 13:24:45 -05:00
Martin Fischer
6f58717ba4
refactor: Stop including Rule::code() in pycodestyle .snap filenames
2023-02-10 13:15:47 -05:00
Florian Best
8aab96fb9e
feat(isort): Implement known-local-folder ( #2657 )
2023-02-10 13:15:34 -05:00
Nick Pope
9e6f7153a9
Handle more functions that never return in RET503 ( #2719 )
2023-02-10 12:09:05 -05:00
Peter Pentchev
cda2ff0b18
Handle functions that never return in RET503 ( #2701 )
2023-02-10 09:28:34 -05:00
Martin Fischer
ec63658250
Disallow rule names starting with avoid-*
2023-02-10 09:25:29 -05:00
Martin Fischer
1a97de0b01
Disallow rule names starting with uses-*
2023-02-10 09:25:29 -05:00
Martin Fischer
1cbe48522e
Disallow rule names ending in *-used
2023-02-10 09:25:29 -05:00
Martin Fischer
bfbde537af
Disallow rule names starting with do-not-*
2023-02-10 09:25:29 -05:00
Martin Fischer
cba91b758b
Add test for rule names
2023-02-10 09:25:29 -05:00
Martin Fischer
bd09a1819f
Drop unused once_cell dependency from ruff_macros
2023-02-10 09:25:29 -05:00
Martin Fischer
682d206992
refactor: Reduce code duplication
2023-02-10 08:24:22 -05:00
Martin Fischer
c32441e4ab
refactor: Use format! keyword arguments
2023-02-10 08:24:22 -05:00
Martin Fischer
6f16f1c39b
refactor: Reduce code duplication
2023-02-10 08:24:22 -05:00
Martin Fischer
9011456aa1
refactor: Simplify attribute handling in rule_code_prefix
...
if_all_same(codes.values().cloned()).unwrap_or_default()
was quite unreadable because it wasn't obvious that codes.values() are
the prefixes. It's better to introduce another Map rather than having
Maps within Maps.
2023-02-10 08:24:22 -05:00
Martin Fischer
fa191cceeb
refactor: Avoid implicit precondition
2023-02-10 08:24:22 -05:00
Charlie Marsh
ac6c3affdd
Remove public Rust API ( #2709 )
2023-02-09 23:16:49 -05:00
Charlie Marsh
9a018c1650
Import AutofixKind from violation
2023-02-09 23:06:02 -05:00
Charlie Marsh
a048594416
Gate Path.readlink()
behind Python 3.9+ guard ( #2708 )
2023-02-09 22:57:31 -05:00
Charlie Marsh
5437f1299b
Remove lifetimes from Printer ( #2704 )
2023-02-09 21:44:15 -05:00
Charlie Marsh
41c0608a69
Add test module a test-only module ( #2703 )
2023-02-09 21:28:10 -05:00
messense
eb0d42187f
Manage LibCST and RustPython with cargo workspace dependencies ( #2700 )
2023-02-09 20:49:50 -05:00
Colin Delahunty
48daa0f0ca
[pylint
]: bad-string-format-type ( #2572 )
2023-02-09 20:08:56 -05:00
Charlie Marsh
417fe4355f
Add colors to statistics output ( #2699 )
2023-02-09 19:40:29 -05:00
Florian Best
a129181407
feat(cli): let --statistics show fixable codes ( #2659 )
2023-02-09 19:36:31 -05:00