Given this example, explicitly allowed by PEP8 (lit. Backslashes may still be appropriate at times. For example, long, multiple with-statements cannot use implicit continuation, so backslashes are acceptable):
async def fnc():
async with asdf() as a, \
bsdf():
return 1
with asdf() as a, \
bsdf():
return 1
with \
asdf() as a, \
bsdf():
return 1
This plugin gives many non-PEP8-compliant false positives:
test_continuation.py:2:1: N400: Found backslash that is used for line breaking
async with asdf() as a, \
bsdf():
^
test_continuation.py:6:1: N400: Found backslash that is used for line breaking
with asdf() as a, \
bsdf():
^
test_continuation.py:11:1: N400: Found backslash that is used for line breaking
with \
asdf() as a, \
bsdf():
^
test_continuation.py:12:3: N400: Found backslash that is used for line breaking
with \
asdf() as a, \
bsdf():
^
Given this example, explicitly allowed by PEP8 (lit.
Backslashes may still be appropriate at times. For example, long, multiple with-statements cannot use implicit continuation, so backslashes are acceptable):This plugin gives many non-PEP8-compliant false positives: