Skip to content

fix: autofix invalid escape sequences with ruff#60

Merged
chrisimcevoy merged 2 commits into
masterfrom
no-ticket/auto-fix-invalid-escape-sequences
Nov 26, 2024
Merged

fix: autofix invalid escape sequences with ruff#60
chrisimcevoy merged 2 commits into
masterfrom
no-ticket/auto-fix-invalid-escape-sequences

Conversation

@chrisimcevoy
Copy link
Copy Markdown
Contributor

@chrisimcevoy chrisimcevoy commented Oct 17, 2024

As reported in cloudsmith-io/cloudsmith-cli#167

The generated Python bindings fire a tonne of invalid escape sequence warnings in modern interpreters.

This PR uses ruff via pre-commit to autofix those.

Verified that this fails in CirecleCI when pre-commit hooks haven't been run:

image

@chrisimcevoy chrisimcevoy marked this pull request as ready for review October 17, 2024 10:09
Copy link
Copy Markdown
Member

@lskillen lskillen left a comment

Choose a reason for hiding this comment

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

Cool. :) We should probably just let ruff do its thing generally after this, and perhaps run it automatically as part of the code generation process. 😁

@chrisimcevoy
Copy link
Copy Markdown
Contributor Author

Cool. :) We should probably just let ruff do its thing generally after this, and perhaps run it automatically as part of the code generation process. 😁

That would be nice, but I kept it this way for now as there might be some ruff rules we wish to enable in future which cannot be automatically fixed... let's have a chat about it!

@chrisimcevoy chrisimcevoy changed the title feat: autofix invalid escape sequences with ruff fix: autofix invalid escape sequences with ruff Oct 17, 2024
@chrisimcevoy chrisimcevoy merged commit 85e6abe into master Nov 26, 2024
@chrisimcevoy chrisimcevoy deleted the no-ticket/auto-fix-invalid-escape-sequences branch November 26, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants