[code-quality] Not Seeing PEP8 Formatting Errors

Rich Shepard rshepard at appl-ecosys.com
Sun Jul 26 17:58:22 CEST 2015


   I've numbered the lines in this code fragment:

83   category = Column(Unicode(16), value = 'Environmental', nullable = False,
84                     CheckConstraint(
84       "category IN('Air', 'Environmental', 'Health', 'Safety', 'Occupancy',
86       'Water'"))

    flake8 has these errors:

84:39: E201 whitespace after '('
86:9: E128 continuation line under-indented for visual indent

   I've read PEP8 and found several fora threads related to E128 and E201 but
no matter how I reformat that statement I cannot remove these (or other)
errors when flake8 runs on this module.

   When I continue line 84 the '(' and emacs breaks it near column 78 I get a
different error about closing brackets not being correctly aligned. But, no
matter where I place the final bracket it shows an error.

   This module has many error conditions simular to the above and I want to
understand how these long lines should be formatted so flake8 no longer
complains regardless of how I change the lines.

Thanks in advance,

Rich




More information about the code-quality mailing list