-
Notifications
You must be signed in to change notification settings - Fork 57
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
is --line-length argument working? #357
Comments
Sorry for the confusion -- we no longer include |
You can see the default configuration at the top here: https://docs.astral.sh/ruff/configuration/ |
Thank you for your fast answer. You are completely right. |
What's even more confusing to me is running |
@jmakov -- Per the above, you need to enable the line-length rule -- it's not included by default, since it often conflicts with using a formatter. Can you try adding |
Thank you for the quick response. Yes, that works. Would expect a flag to overwrite everything when the user uses it. Anyhow, my probl is solved, thanks. |
@romanholidaypancakes I'm assuming that you're using Regardless, the |
I am using vscode, I reconfigured the following in settings.json,
but still got an error Then I set this
No error is reported, but the string is not formatted when the length is exceeded |
Can you share a minimal source code on which you're running Ruff? I'm guessing that it's a long string and your expectation is that the string should break once it goes beyond the line length. Is that correct? If so, then that's not currently supported, it can be tracked here: astral-sh/ruff#6936. |
Yes, for example, if I set the maximum length to 130, then the excess will be automatically formatted. I remember using ruff before and it worked fine. |
Yeah, that is not yet supported, refer to the linked issue. |
I am using VSCode 1.85 with Ruff extension updated (0.1.5).


I am trying to set the limit-length argument, but the E501 is not showing.
I think some screenshots will be useful in order to explain the issue:
My program is just two lines: one with an f-string without placeholders (line 2) and another one with a long line (line 3, 135 characters long). The F541 warning is shown as expected:
If I ignore the F541 warning in settings.json, the warning is not shown anymore:
So ruff seems to be working as expected, but the E501 is not shown.
I understand that line length must be set in ruff.lint.args, as explained in astral-sh/ruff#8363
Am I doing something wrong or is it a ruff extension bug?
Thanking you in advance,
Bartolomé Sintes
The text was updated successfully, but these errors were encountered: