Conversation
Enables linter's E501 rule to enforce maximum line length. The rule is separate from the code formatter and primarily targets blocks of comments, strings, documentation etc. Ruff version is also bumped to allow more control over the linter such as disabling rules for blocks of code. Files are reformatted to adhere to the new linter rule. There is no auto fix available, offending cases have to be addressed manually.
Hmm, that's unfortunate. It becomes a game of cat and mouse. If the tool doesn't do that on its own, then the value of having this check is greatly reduced. |
|
As the line length applies to raw string blocks, like comments, docs etc., it's reasonable that the final layout is driven by human intention. If needed rule can be selectively disabled. Otherwise, offending text has to be reformatted such that it retains its original semantics (like ASCII art/graph for an extreme example). Ultimately, the final linter pass enforces better readability for these raw strings. |
tkarna
left a comment
There was a problem hiding this comment.
LGTM. Long comments seem to be a recurring issue so enforcing a limit sounds like a good idea even if it has to be addressed manually.
Nit: the diff shows some code changes as well so the code line limit is also different now?
There are two types:
|
Enables linter's E501 rule to enforce maximum line length. The rule is separate from the code formatter and primarily targets blocks of comments, strings, documentation etc.
Ruff version is also bumped to allow more control over the linter such as disabling rules for blocks of code.
Files are reformatted to adhere to the new linter rule. There is no auto fix available, offending cases have to be addressed manually.