OpenHands/skills/fix-py-line-too-long.md
Hiep Le 36cf4e161a
fix(backend): ensure microagents are loaded for V1 conversations (#11772)
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
2025-11-19 18:54:08 +07:00

971 B

name, type, version, agent, triggers
name type version agent triggers
fix-py-line-too-long knowledge 1.0.0 CodeActAgent
E501
line too long

Instructions for fixing "E501 Line too long"

For code lines

Break into multiple lines using parentheses or brackets:

result = some_very_long_function_name(
    parameter1, parameter2, parameter3
)

For single-line strings

Use string concatenation: "ABC"("A" "B" "C")

message = ("This is a very long string "
           "that needs to be broken up")

For long multi-line strings (docstrings)

Add # noqa: E501 AFTER the ending """. NEVER add it inside the docstring.

def example_function():
    """This is a very long docstring that exceeds the line length limit."""  # noqa: E501
    pass

What NOT to do

  • Do not add # noqa: E501 inside docstrings or multi-line strings
  • Do not break strings in the middle of words
  • Do not sacrifice code readability for line length compliance