PyCQA / PyCQA/pycodestyle

E501: strings links should allow “introduction”

Open
#406 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.2k
Forks
754
PR merge metrics
No merged PRs in 30d

Description

The line length checker excepts URL only lines because of #224 which is sensible. But usually there is some introduction like:

So maybe there is a way to allow something before an URL when it's a comment or doc string. The question is now what is sensible. Maybe something like [^ ]+: so it would allow the above line or something like:

See: https://example.com/a-very-very-very…

It wouldn't allow “See also:” so maybe it should just strip the URL and check the rest of the line?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the E501 implementation and the behavior introduced by #224. Resolve whether comment or docstring lines with introductory text should be accepted, define the exact rule, and verify it against the URL examples in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.