E122: false positive: continuation line missing indentation or outdented
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
Are you able to share a StackBlitz or some more detailed code to reproduce this?
This is happening in the MiniNode component, where we query the DOM to get the background color of the corresponding Node. The error message is essentially saying that the selector being used is not valid because it is being passed an ID that includes a JS object value rather than a string/number. I can recreate this error message by doing exactly that.
Assuming there isn't an underlying issue, my first step would be to ensure the ID of the Node is being set with a correct value. If you're using TypeScript, this would be caught by a linting error as only strings/numbers are accepted types for that prop. If we can eliminate that as a possibility, I can look around for what else might be causing it.
It looks like it was an issue with the id of one of my nodes. It was set as an integer in my database but being converted to an object when passed to the node. Thanks for the help!