Skip to content

[pylint] Fix PLC2801 autofix creating a syntax error - #18857

Merged
ntBre merged 1 commit into
astral-sh:mainfrom
LaBatata101:fix-PLC2801
Jun 23, 2025
Merged

ntBre merged 1 commit into
astral-sh:mainfrom
LaBatata101:fix-PLC2801

Conversation

@LaBatata101

Copy link
Copy Markdown
Contributor

Summary

This PR fixes PLC2801 autofix creating a syntax error due to lack of padding if it is directly after a keyword.

Fixes #18813

Test Plan

Add regression test

@github-actions

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice, thank you! I didn't know about pad either.

@ntBre ntBre added bug An issue describing something that isn't working, or a PR that fixes a bug fixes Related to suggested fixes for violations labels Jun 23, 2025
@ntBre
ntBre merged commit f4c6ff3 into astral-sh:main Jun 23, 2025
@LaBatata101
LaBatata101 deleted the fix-PLC2801 branch June 23, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue describing something that isn't working, or a PR that fixes a bug fixes Related to suggested fixes for violations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Pylint] [preview] PLC2801 fix can create a syntax error

2 participants