22 May 2013

PEP8 E501 is Idiotic

Generally I avoid getting vocal about syntax, but "E501 line too long (80 characters)" in PEP8 is downright idiotic.

Which of these two pieces of code looks right?

GOOD

if saltcloud.utils.wait_for_passwd(
    host=ip_address,
    username=user,
    ssh_timeout=60,
    key_filename=key_filename,
    display_ssh_output=display_ssh_output
):
    username = user
    break

BAD

if saltcloud.utils.wait_for_passwd(host=ip_address,
                                   username=user,
                                   ssh_timeout=60,
                                   key_filename=key_filename,
                                   display_ssh_output=display_ssh_output):
    username = user
    break

Are you guys for real?

:x


Tagged in code