You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding links to docstring, if the link name has multiple words then E501 Line too long is raised, even if the link is in a single line. (Related to #3051)
Ruff version 0.0.257
Command ruff check <module>
Minimal code snippet:
deffunc():
""" [this-is-ok](https://loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog.url.com) [this is not](https://loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog.url.com) """
...
The text was updated successfully, but these errors were encountered:
FBruzzesi
changed the title
Multi words link name
E501 for multi-words link name
Mar 20, 2023
FWIW, I think the first case is unrelated to the presence of the link -- instead, it passes because there's no whitespace, so there's no way to split up the line.
We may be able to handle the second case by detecting if the last word on the line appears to be a URL, we don't do any Markdown parsing though so from the linter's perspective that line doesn't "end with" a URL.
Thank you for getting back so quickly!
Indeed such case could only happen in the docstring. However it gets caught by the parser.
A possible fix may be to check for the line to match the regex "^\[.*\]\(https?://\S+\)".
When adding links to docstring, if the link name has multiple words then
E501 Line too long
is raised, even if the link is in a single line. (Related to #3051)ruff check <module>
The text was updated successfully, but these errors were encountered: