Back to Skills
OpenHandsDevelopment & Code Tools
fix-py-line-too-long
Break into multiple lines using parentheses or brackets:
Documentation
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: E501inside docstrings or multi-line strings - Do not break strings in the middle of words
- Do not sacrifice code readability for line length compliance
Quick Info
- Source
- OpenHands
- Category
- Development & Code Tools
- Repository
- View Repo
- Scraped At
- Jan 26, 2026
Tags
pythonagent
Related Skills
2d-games
2D game development principles. Sprites, tilemaps, physics, camera.
add_repo_inst
Please browse the current repository under /workspace/{{ REPO_FOLDER_NAME }}, look at the documentation and relevant code, and understand the purpose of this repository.
address_pr_comments
First, check the branch {{ BRANCH_NAME }} and read the diff against the main branch to understand the purpose.