Skip to content

STY: upgrading ruff to 0.15 #19261

@neutrinoceros

Description

@neutrinoceros

Another major version of ruff dropped https://astral.sh/blog/ruff-v0.15.0

Most newly stabilized linting rules have auto-fixes, and I personally think they are all clear improvements. Since we are almost a month away from an auto-upgrade now, I think I'll go with sweeping PRs instead of subpackage targetted ones for a change.

Summary:

❯ ruff check astropy --statistics
72	RUF061 	[ ] legacy-form-pytest-raises
 6	FURB110	[*] if-exp-instead-of-or-operator
 6	PLW0108	[ ] unnecessary-lambda
 2	SIM910 	[*] dict-get-with-none-default
 1	PLC0207	[*] missing-maxsplit-arg
Found 87 errors.
[*] 9 fixable with the `--fix` option (76 hidden fixes can be enabled with the `--unsafe-fixes` option)

Hopefully there's more than enough time to converge on them. I'll link related PRs here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions