0

This is not my code, but I'm asked to fix some flake8 lint errors.

There's a line in the code that looks like this

some_very_longggg_variable_name_on_the_lhs = SomeLongClassNameIsHere.func_name(input_dt=some_default_input_dt_that_has_a_really_long_name_here)

I'm unable to change the names of the variables. The number of columns is 144 and I need to get it to 120.

It doesn't allow me to break it at the equal sign like the following and I also tried putting the argument of func_name on the next line, but flake8 requires aligning the new line with the ( on the previous line so that doesn't help. I'm not sure what else to do.

some_very_longggg_variable_name_on_the_lhs 
= SomeLongClassNameIsHere.func_name(input_dt=some_default_input_dt_that_has_a_really_long_name_here)
roulette01
  • 1,984
  • 2
  • 13
  • 26

1 Answers1

-1

Python will not break a statement inside parentheses of any kind, so

a = (
    b
)

is the simplest, most legible and most maintainable way to do this.

Amadan
  • 191,408
  • 23
  • 240
  • 301