Martin Fischer
8120d7c974
Change rule page links in README from GitHub to beta.ruff.rs
2023-02-13 19:34:06 -05:00
Anders Kaseorg
b9d075c252
Alphabetize flake8-raise and flake8-self in documentation ( #2871 )
2023-02-13 18:03:09 -05:00
Charlie Marsh
3c03e2cb2e
Rename flake8-django rules to match convention ( #2861 )
2023-02-13 15:30:04 +00:00
Charlie Marsh
6128346b08
Re-show --target-version on CLI interface ( #2859 )
2023-02-13 15:04:11 +00:00
Ville Skyttä
d1cf0ee52b
Remove "blanket" from RUF100 README message ( #2844 )
2023-02-13 14:43:35 +00:00
Charlie Marsh
63f3d5e610
Update pre-commit instructions ( #2838 )
2023-02-13 00:06:40 +00:00
Charlie Marsh
83f6e52c92
Bump version to 0.0.246 ( #2834 )
2023-02-12 23:39:51 +00:00
Charlie Marsh
8b35b052b8
Avoid duplicates in if-with-same-arms ( #2827 )
2023-02-12 22:22:19 +00:00
Colin Delahunty
1f07ad6e61
[flake8-simplify
]: combine-if-conditions ( #2823 )
2023-02-12 21:00:32 +00:00
Charlie Marsh
1666e8ba1e
Add a --show-fixes
flag to include applied fixes in output ( #2707 )
2023-02-12 20:48:01 +00:00
Zeddicus414
26f39cac2f
Add PD002 use-of-inplace-argument documentation ( #2799 )
2023-02-12 18:10:34 +00:00
Simon Brugman
02897a141b
[flake8-tidy-imports
] add documentation for banned-api
( #2819 )
2023-02-12 18:09:39 +00:00
Nyakku Shigure
fc465cc2af
[flake8-pyi
]: add rules for unrecognized platform check (PYI007, PYI008) ( #2805 )
...
Add two [flake8-pyi](https://github.com/PyCQA/flake8-pyi ) rules (Y007, Y008). ref: #848
The specifications are described in [PEP 484 - Version and platform checking](https://peps.python.org/pep-0484/#version-and-platform-checking )
The original implementation in flake8-pyi is shown below.
- Implemention: 66f28a4407/pyi.py (L1429-L1443)
- Tests: 66f28a4407/tests/sysplatform.pyi
2023-02-12 18:02:38 +00:00
Karol Onyśko
6769a5bce7
Implement flake8-django plugin rules ( #2586 )
2023-02-12 17:47:59 +00:00
Zeddicus414
fda93c6245
Add E722 bare-except documentation ( #2796 )
2023-02-12 16:51:32 +00:00
Simon Brugman
1d4422f004
[flake8-comprehensions
] improve autofix for C401, C402 and C417 ( #2806 )
2023-02-12 16:03:37 +00:00
Simon Brugman
2dccb7611a
[flake8-comprehensions
] bugfix for C413 autofix ( #2804 )
2023-02-12 15:56:07 +00:00
Simon Brugman
0123425be1
[flake8-comprehensions
] autofix C414 and C417 + bugfix ( #2693 )
...
Closes https://github.com/charliermarsh/ruff/issues/2262 and closes https://github.com/charliermarsh/ruff/issues/2423
Fixes bug where some cases generated duplicated violations (see https://github.com/charliermarsh/ruff/pull/2732#issuecomment-1426397842 )
2023-02-12 05:20:42 +00:00
Martin Fischer
0e4d5eeea7
Implement config subcommand
...
The synopsis is as follows.
List all top-level config keys:
$ ruff config
allowed-confusables
builtins
cache-dir
... etc.
List all config keys in a specific section:
$ ruff config mccabe
max-complexity
Describe a specific config option:
$ ruff config mccabe.max-complexity
The maximum McCabe complexity to allow before triggering `C901` errors.
Default value: 10
Type: int
Example usage:
```toml
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 5
```
2023-02-11 23:43:09 -05:00
Charlie Marsh
d827a9156e
Add documentation on enabling autocompletion ( #2791 )
2023-02-12 02:51:50 +00:00
Charlie Marsh
418808895e
Add docs for f-string-missing-placeholders and unused-variable ( #2790 )
2023-02-12 02:48:36 +00:00
Charlie Marsh
19fc410683
Remove raw string from hardcoded-sql-expression ( #2780 )
2023-02-11 20:05:57 +00:00
Charlie Marsh
97dcb738fa
Run cargo dev generate-all
2023-02-11 12:43:48 -05:00
Michał Mrówka
77099dcd4d
implemented option lines-between-types for isort ( #2762 )
...
Fixes #2585
Add support for the isort option [lines_between_types](https://pycqa.github.io/isort/docs/configuration/options.html#lines-between-types )
2023-02-11 12:17:37 -05:00
Martin Fischer
70ff65154d
Rename function-is-too-complex to complex-structure
2023-02-11 12:05:17 -05:00
Martin Fischer
7db6a2d6d4
Rename rules containing PEP reference in name
2023-02-11 12:05:17 -05:00
Martin Fischer
42924c0d9a
Rename a bunch of pydocstyle rules
2023-02-11 12:05:17 -05:00
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
Simon Brugman
e83ed0ecba
Implement autofix for relative imports (TID252) ( #2739 )
2023-02-10 22:05:47 -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
acb70520f8
Add colored environment variables to README ( #2746 )
2023-02-10 17:06:02 -05:00
Charlie Marsh
6eb9268675
Allow named unicodes in bidirectional escape check ( #2710 )
2023-02-10 16:59:28 -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
Florian Best
8aab96fb9e
feat(isort): Implement known-local-folder ( #2657 )
2023-02-10 13:15: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
Colin Delahunty
48daa0f0ca
[pylint
]: bad-string-format-type ( #2572 )
2023-02-09 20:08:56 -05:00
Matt Oberle
fc628de667
Implement bandit's 'hardcoded-sql-expressions' S608 ( #2698 )
...
This is an attempt to implement `bandit` rule `B608` (renamed here `S608`).
- https://bandit.readthedocs.io/en/latest/plugins/b608_hardcoded_sql_expressions.html
The rule inspects strings constructed via `+`, `%`, `.format`, and `f""`.
- `+` and `%` via `BinOp`
- `.format` via `Call`
- `f""` via `JoinedString`
Any SQL-ish strings that use Python string formatting are flagged.
The expressions and targeted expression types for the rule come from here:
- 7104b336d3/bandit/plugins/injection_sql.py
> Related Issue: https://github.com/charliermarsh/ruff/issues/1646
2023-02-09 19:28:17 -05:00
Charlie Marsh
9e2418097c
Run cargo dev generate-all
2023-02-09 19:14:02 -05:00
Steve Dignam
67e58a024a
Add flake8-pyi with one rule ( #2682 )
...
Add basic scaffold for [flake8-pyi](https://github.com/PyCQA/flake8-pyi ) and the first rule, Y001
rel: https://github.com/charliermarsh/ruff/issues/848
2023-02-09 19:03:11 -05:00
Charlie Marsh
7d5fb0de8a
Add documentation for mccabe, isort, and flake8-annotations ( #2691 )
2023-02-09 11:56:18 -05:00
Charlie Marsh
54d1719424
Hide rule configuration settings on CLI ( #2687 )
2023-02-09 11:13:04 -05:00
Charlie Marsh
739a92e99d
Implement compound-statements (E701, E702, E703, E704) ( #2680 )
2023-02-08 22:57:39 -05:00