Skip to content
Back to skills

Fix Py Line Too Long

ASecurity

Break into multiple lines using parentheses or brackets:

  • 6 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 11, 2026
ai-agentspythongogit

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add ranbot-ai/awesome-skills --skill fix-py-line-too-long --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fix Py Line Too Long?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fix Py Line Too Long
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ranbot-ai-fix-py-line-too-long/badge)](https://www.skillsdirectory.com/skills/ranbot-ai-fix-py-line-too-long)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fix-py-line-too-long
description: Break into multiple lines using parentheses or brackets: 
category: Development & Code Tools
source: openhands
tags: [python, agent]
url: https://github.com/OpenHands/OpenHands/blob/main/skills/fix-py-line-too-long.md
---


# Instructions for fixing "E501 Line too long"

## For code lines
Break into multiple lines using parentheses or brackets:
```python
result = some_very_long_function_name(
    parameter1, parameter2, parameter3
)
```

## For single-line strings
Use string concatenation: `"ABC"` → `("A" "B" "C")`
```python
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.
```python
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.