Skip to content

Conversation

phanirithvij
Copy link

closes #891

if command.startswith("ruff"):
return [
(
rf"(?<=--> {re.escape(relative_path)}:)\d+"
Copy link
Author

@phanirithvij phanirithvij Sep 13, 2025

Choose a reason for hiding this comment

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

I am a bit confused what's required here.

I tried rf"(?<=\s+--> {re.escape(relative_path)}:)\d+" but it fails because re.PatternError: look-behind requires fixed-width pattern. so \s+ is not allowed.

I saw both _--> and __--> in the ruff tests.

Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks for your fix

I'm not sure what you mean here, sorry - did you figure out a fix?

)

# simple dedent of '\s+-->'
out = "\n".join(sorted([x.lstrip() for x in output]))
Copy link
Author

Choose a reason for hiding this comment

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

so I am doing lstrip here to handle arbitrary indentation

Copy link
Author

Choose a reason for hiding this comment

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

Yes, my fix for the above issue is here.

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.

ruff output format changes in 0.12.10

2 participants