Colin Delahunty
6272293180
[pylint
]: bad-str-strip-call (With Autofix) ( #2570 )
2023-02-06 15:34:37 -05:00
Charlie Marsh
7fa5ce8b63
Automatically remove empty type-checking blocks ( #2598 )
2023-02-05 18:46:07 -05:00
Charlie Marsh
f6864a96f6
Enable autofix for unnecessary-paren-on-raise-exception ( #2596 )
2023-02-05 18:19:27 -05:00
Colin Delahunty
1e1dc3a7ed
[pyupgrade
]: Removes quotes from annotations ( #2431 )
2023-02-05 09:43:09 -05:00
Chris Chan
ced55084db
Implement pylint's too-many-return-statements
rule (PLR0911
) ( #2564 )
2023-02-04 16:56:36 -05:00
Chris Chan
f8f36a7ee0
Implement pylint's too-many-branches
rule (PLR0912
) ( #2550 )
2023-02-04 16:38:03 -05:00
Charlie Marsh
7d4f0a8320
Bump Ruff version to 0.0.241
2023-02-03 19:25:12 -05:00
Pierre Sassoulas
e6316b185e
[pylint] Rename 'too-many-args' to 'too-many-arguments'
...
The actual name
2023-02-03 18:58:32 -05:00
Pierre Sassoulas
a2183be96e
[pylint] Rename constant-comparison to comparison-of-constant
...
The actual name
2023-02-03 18:58:32 -05:00
Pierre Sassoulas
df39a95925
[pylint] Rename use-sys-exit to consider-using-sys-exit
...
The actual name
2023-02-03 18:58:32 -05:00
Charlie Marsh
b9c1a3c5c1
Move benchmarking instructions to CONTRIBUTING.md ( #2554 )
2023-02-03 14:53:53 -05:00
Aarni Koskela
38addbe50d
Soft-deprecate update_check ( #2530 )
2023-02-03 11:33:38 -05:00
Jacob Coffee
04ef674195
Add Jetbrains Webinar Event (Temporary) ( #2516 )
2023-02-03 08:08:27 -05:00
Florian Best
7e9b9cc7b3
feat: add autofix for PLR0402 ( #2504 )
2023-02-02 23:25:16 -05:00
Jonathan Plasse
bdcab87d2f
Add markdownlint
and dev Ruff to pre-commit
( #2303 )
2023-02-02 16:29:07 -05:00
Charlie Marsh
651f6b6bce
Bump Ruff version to 0.0.240
2023-02-02 12:45:23 -05:00
Charlie Marsh
668860cba3
Add more information to Pylint FAQ section
2023-02-02 11:08:17 -05:00
Chris Chan
8136cc9238
Implement pylint's too-many-statements
rule (PLR0915
) ( #2445 )
2023-02-02 08:18:37 -05:00
Aarni Koskela
cce8fb9882
isort: support forced_separate ( #2268 )
2023-02-02 08:08:02 -05:00
Maksudul Haque
9e59c99133
[flake8-self
] Add Plugin and Rule SLF001
( #2470 )
2023-02-02 07:58:14 -05:00
Colin Delahunty
b032f50775
[pyupgrade
]: Remove outdated sys.version_info
blocks ( #2099 )
2023-02-02 07:49:24 -05:00
Reid Swan
ec7b25290b
feat: Add isort option lines-after-imports ( #2440 )
...
Fixes https://github.com/charliermarsh/ruff/issues/2243
Adds support for the isort option [lines_after_imports](https://pycqa.github.io/isort/docs/configuration/options.html#lines-after-imports ) to insert blank lines between imports and the follow up code.
2023-02-01 21:39:45 -05:00
Charlie Marsh
2abaffd65b
Improve consistency of backticks for plugin names ( #2460 )
2023-02-01 19:17:32 -05:00
Charlie Marsh
06cbf5a2ae
Add some top-level links to the README ( #2458 )
2023-02-01 19:10:41 -05:00
Henry Schreiner
db1b1672b8
fix: minor spacing typo in message for PTH123 ( #2453 )
2023-02-01 14:39:50 -05:00
Charlie Marsh
6861e59103
Only avoid PEP604 rewrites for pre-Python 3.10 code ( #2449 )
...
I moved the `self.in_annotation` guard out of the version check in #1563 . But, I think that was a mistake. It was done to resolve #1560 , but the fix in that case _should've_ been to set a different Python version.
Closes #2447 .
2023-02-01 13:03:51 -05:00
Charlie Marsh
c15595325c
Bump version to 0.0.239
2023-01-31 19:06:22 -05:00
Maksudul Haque
7c1a6bce7b
[flake8-raise
] Add Plugin and RSE102
Rule ( #2354 )
2023-01-31 18:09:40 -05:00
Thomas M Kehrenberg
c3a3195922
Fix option name "max-args" in the documentation ( #2401 )
2023-01-31 12:30:05 -05:00
Hassan Kibirige
da4618d77b
For neovim:null_ls use ruff builtin for formatting ( #2386 )
...
null_ls picked up the recommended snippet in README.md and ruff formatting now a builtin.
Ref:
1. 482990e391
2. 7b2b28e207/doc/BUILTINS.md (ruff-1)
2023-01-31 07:22:14 -05:00
Erik Welch
adc134ced0
Fix typos: s/scripy/scipy/g ( #2380 )
2023-01-31 07:17:18 -05:00
Charlie Marsh
00495e8620
Use human-readable types for documentation values ( #2375 )
2023-01-30 23:05:28 -05:00
Colin Delahunty
ad8693e3de
[pyupgrade
] Implement import-replacement rule (UP035
) ( #2049 )
2023-01-30 19:58:28 -05:00
Charlie Marsh
69e20c4554
Minor improvements to the docs ( #2371 )
2023-01-30 19:06:05 -05:00
Charlie Marsh
b5816634b3
Add a link to MkDocs ( #2370 )
2023-01-30 19:00:57 -05:00
Charlie Marsh
1cbd929a0a
Bump version to 0.0.238
2023-01-30 16:44:19 -05:00
Charlie Marsh
5f07e70762
Recommend disabling explicit-string-concatenation
( #2366 )
...
If `allow-multiline = false` is set, then if the user enables `explicit-string-concatenation` (`ISC003`), there's no way for them to create valid multiline strings. This PR notes that they should turn off `ISC003`.
Closes #2362 .
2023-01-30 16:42:30 -05:00
Charlie Marsh
4589daa0bd
Ignore magic comparisons to bytes by default ( #2365 )
2023-01-30 16:31:48 -05:00
Charlie Marsh
ea0274d22c
Use bold for deprecated
2023-01-30 16:28:21 -05:00
Charlie Marsh
ca1129ad27
Document new rule config resolution
2023-01-30 16:26:59 -05:00
Martin Fischer
ba457c21b5
Improve rule config resolution
...
Ruff allows rules to be enabled with `select` and disabled with
`ignore`, where the more specific rule selector takes precedence,
for example:
`--select ALL --ignore E501` selects all rules except E501
`--ignore ALL --select E501` selects only E501
(If both selectors have the same specificity ignore selectors
take precedence.)
Ruff always had two quirks:
* If `pyproject.toml` specified `ignore = ["E501"]` then you could
previously not override that with `--select E501` on the command-line
(since the resolution didn't take into account that the select was
specified after the ignore).
* If `pyproject.toml` specified `select = ["E501"]` then you could
previously not override that with `--ignore E` on the command-line
(since the resolution didn't take into account that the ignore was
specified after the select).
Since d067efe265
(#1245 )
`extend-select` and `extend-ignore` always override
`select` and `ignore` and are applied iteratively in pairs,
which introduced another quirk:
* If some `pyproject.toml` file specified `extend-select`
or `extend-ignore`, `select` and `ignore` became pretty much
unreliable after that with no way of resetting that.
This commit fixes all of these quirks by making later configuration
sources take precedence over earlier configuration sources.
While this is a breaking change, we expect most ruff configuration
files to not rely on the previous unintutive behavior.
2023-01-30 16:26:59 -05:00
Charlie Marsh
01fedec1e7
Add SciPy and meson-python ( #2363 )
2023-01-30 15:34:19 -05:00
Martin Fischer
ef20692149
fix: clap usage for CLI help generation in the README ( #2358 )
2023-01-30 13:14:40 -05:00
Simon Brugman
50046fbed3
Extend conventional imports defaults to include TensorFlow et al ( #2353 )
...
extend conventional imports
Based on configuration from Visual Studio for Python
(https://code.visualstudio.com/docs/python/editing#_quick-fixes )
2023-01-30 11:04:19 -05:00
Akhil
8e5a944ce1
Implement Pylint's too-many-arguments
rule (PLR0913
) ( #2308 )
2023-01-30 07:34:37 -05:00
Simon Brugman
2ef28f217c
pandas vet autofix for PD002 and general refactor
2023-01-29 22:30:37 -05:00
Martin Fischer
d76a47d366
Implement ruff linter
subcommand
...
The subcommand lists all supported upstream linters and their prefixes:
$ ruff linter
F Pyflakes
E/W pycodestyle
C90 mccabe
I isort
N pep8-naming
D pydocstyle
UP pyupgrade
YTT flake8-2020
# etc...
Just like with the `rule` subcommand `--format json` is supported:
$ ruff linter --format json
[
{
"prefix": "F",
"name": "Pyflakes"
},
{
"prefix": "",
"name": "pycodestyle",
"categories": [
{
"prefix": "E",
"name": "Error"
},
{
"prefix": "W",
"name": "Warning"
}
]
},
# etc...
2023-01-29 21:32:37 -05:00
Charlie Marsh
3ee6a90905
Remove remove-six-compat (UP016) ( #2332 )
2023-01-29 21:19:59 -05:00
Simon Brugman
5165b703d9
Add VS Code to gitignore; fix typos ( #2333 )
2023-01-29 21:14:38 -05:00
Charlie Marsh
64fb0bd2cc
Include both ruff help
and ruff help check
in README ( #2325 )
2023-01-29 17:01:15 -05:00