-
-
Notifications
You must be signed in to change notification settings - Fork 46
ruff: 0.12.10 fixes #892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
ruff: 0.12.10 fixes #892
Conversation
Signed-off-by: phanirithvij <[email protected]>
Signed-off-by: phanirithvij <[email protected]>
af1cb17
to
e715abb
Compare
if command.startswith("ruff"): | ||
return [ | ||
( | ||
rf"(?<=--> {re.escape(relative_path)}:)\d+" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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])) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
closes #891