Skip to content

Commit

Permalink
Ignore "line too long" errors from flake8 on db migrations
Browse files Browse the repository at this point in the history
Black reformats these files before flake8 lints them, but:
* it doesn't (yet) wrap the long strings (see psf/black#182);
* it has issues with inserting trailing commas on nested collections, regularly resulting in causing pycodestyle E231 errors.

A case could be made for excluding db migrations from linting altogether, tbh.
  • Loading branch information
simonwiles committed Jun 19, 2020
1 parent c4df4cd commit fa3b1f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
[flake8]
# B950 line too long
# E231 missing whitespace after ‘,’
# E266 too many leading ‘#’ for block comment
# E303 too many blank lines (3)
# E501 line too long
# F403 ‘from module import *’ used; unable to detect undefined names
# W503 line break before binary operator
ignore = E266, E303, F403, W503
max-line-length = 89
max-complexity = 18
select = B,C,E,F,T,W,B9
per-file-ignores =
*/migrations/*:B950, E231, E501

0 comments on commit fa3b1f7

Please sign in to comment.