Skip to content

Apply ruff (RUF) and tryceratops (TRY) rules#336

Merged
miketheman merged 2 commits intopypa:mainfrom
DimitriPapadopoulos:RUF_TRY
Apr 10, 2026
Merged

Apply ruff (RUF) and tryceratops (TRY) rules#336
miketheman merged 2 commits intopypa:mainfrom
DimitriPapadopoulos:RUF_TRY

Conversation

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor

I would suggest testing with ruff in addition to, or instead of flake8. This prepares such a change.

Copy link
Copy Markdown
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

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

Generally fine.

Comment thread readme_renderer/clean.py Outdated
Comment on lines +88 to +89
else:
return cleaned
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.

I think that if we're going to move it, let's remove the else return cleaned as the final operation, unless there's a reason to keep it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread readme_renderer/rst.py Outdated
RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
TRY300 Consider moving this statement to an `else` block
Copy link
Copy Markdown
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

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

Thanks!

@miketheman miketheman merged commit a2c3861 into pypa:main Apr 10, 2026
10 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the RUF_TRY branch April 10, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants