I have some python code that I run through pylint and that I decided to also run through pycodestyle.
To avoid long lines in a with statement, I do the following:
with my_context_manager(
argument1,
argument2) as something:
rest_of_my_code
But pycodestyle tells me that
E125 continuation line with same indent as next logical line
So I indent this further, as follows:
with my_context_manager(
argument1,
argument2) as something:
rest_of_my_code
But now pylint tells me:
Wrong hanging indentation (remove 4 spaces).
Is there a better solution that would satisfy both code quality checkers?
rest_of_my_codethe other way (i.e. ahead ofargument1andargument2)? – Tagc 19 mins ago