Skip to content

Enable more preview pycodestyle error rules in ruff - #32126

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
QuLogic:more-lint
Jul 28, 2026
Merged

Enable more preview pycodestyle error rules in ruff#32126
timhoffm merged 1 commit into
matplotlib:mainfrom
QuLogic:more-lint

Conversation

@QuLogic

@QuLogic QuLogic commented Jul 27, 2026

Copy link
Copy Markdown
Member

PR summary

The following rules are skipped because they cause too many changes:

2559    E226    [*] missing-whitespace-around-arithmetic-operator
1475    E241    [*] multiple-spaces-after-comma

Additionally, fix the following errors:

37	E303	[*] too-many-blank-lines
18	E231	[*] missing-whitespace
16	E252	[*] missing-whitespace-around-parameter-equals
 2	E301	[*] blank-line-between-methods
 1	E116	[ ] unexpected-indentation-comment
 1	E271	[*] multiple-spaces-after-keyword

All remaining rules that were enabled are already clean.

AI Disclosure

None

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • [n/a] Plotting related features are demonstrated in an example
  • [n/a] New features and API changes have release notes
  • [n/a] Documentation complies with general and docstring guidelines

The following rules are skipped because they cause too many changes:

```
2559    E226    [*] missing-whitespace-around-arithmetic-operator
1475    E241    [*] multiple-spaces-after-comma
```

Additionally, fix the following errors:

```
37	E303	[*] too-many-blank-lines
18	E231	[*] missing-whitespace
16	E252	[*] missing-whitespace-around-parameter-equals
 2	E301	[*] blank-line-between-methods
 1	E116	[ ] unexpected-indentation-comment
 1	E271	[*] multiple-spaces-after-keyword
```

All remaining rules that were enabled are already clean.

@rcomer rcomer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rules specially about tabs are perhaps redundant. I cannot imagine anyone writing something like this example.
https://docs.astral.sh/ruff/rules/tab-after-operator/

@QuLogic

QuLogic commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

It does seem unlikely, but these are all E rules, so they would get enabled by our general config once they're out of preview; might as well have them on now.

@timhoffm
timhoffm merged commit d4975f9 into matplotlib:main Jul 28, 2026
46 checks passed
@QuLogic
QuLogic deleted the more-lint branch July 28, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants