E122: false positive: continuation line missing indentation or outdented
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.2k
- Forks
- 754
- PR merge metrics
- No merged PRs in 30d
Description
It seems there's a false positive for E122.
Consider the following snippet
# pep8test.py
def foo(bar):
pass
# valid:
{
'title': (
'Brixton Summer Solstice Roof Party 2015 With DJ Kon'
' (3 Hr Sunset Set)'
),
}
# valid:
{
'time_london':
foo('hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhello'),
}
# valid:
{
'time_london':
'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhello',
'title': (
'Brixton Summer Solstice Roof Party 2015 With DJ Kon'
' (3 Hr Sunset Set)'
),
}
# invalid:
{
'time_london':
foo('hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhello'),
'title': (
'Brixton Summer Solstice Roof Party 2015 With DJ Kon'
' (3 Hr Sunset Set)'
),
}
When running pep8 I get:
pep8test.py:37:5: E122 continuation line missing indentation or outdented
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the E122 report from the examples in pep8test.py, then trace the E122 checker in the repository's Python implementation. Done means the three valid snippets produce no E122 warning while the marked invalid snippet still reports the expected indentation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100