PyCQA / pycodestyle

Simple Python style checker in one Python file
https://pycodestyle.pycqa.org
Other
5.04k stars 752 forks source link

E122 false positive after new line string concatenation with f-string #1263

Closed dsotirho-ucsc closed 1 month ago

dsotirho-ucsc commented 1 month ago

The following code…

dict(a='AAA'
       f'{4*2}',
     b=[
         'BBB',
         'BBB',
     ],
     c='CCC')

…causes

example.py:6:6: E122 continuation line missing indentation or outdented

The required conditions for this false positive appear to be:

The false positive does not occur if:

Verified with flake8 7.1.1

asottile commented 1 month ago

fairly certain this is a duplicate of #408 and/or #372 -- that said that code is pretty ugly so not surprised there's a diagnostic from it