.flake8 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. [flake8]
  2. max-line-length = 120
  3. max-complexity = 10
  4. exclude =
  5. # Other languages
  6. *.js,
  7. css,
  8. js,
  9. # Bytecode
  10. *.pyc,
  11. # Configuration files
  12. .git,
  13. ignore =
  14. # NDB instrospection support
  15. # *Comparison to true should be 'if cond is true:' or 'if cond:'*
  16. # https://lintlyci.github.io/Flake8Rules/rules/E712.html
  17. # e.g.: User.query(User.verified == False)
  18. E712,
  19. # *Comparison to None should be 'if cond is not None:'*
  20. # https://lintlyci.github.io/Flake8Rules/rules/E711.html
  21. # e.g.: Shop.query(pdt.Shop.chain == None)
  22. E711,
  23. # *Line-break occurred before binary operator*
  24. # https://lintlyci.github.io/Flake8Rules/rules/W503.html
  25. # Because it is the opposite of PEP8 and will be reversed in the future
  26. # e.g.:
  27. # is_amount_equal_to_immediately_after_amount = (
  28. # not is_amount_equal_to_prior_amount
  29. # and history
  30. # and insertion_idx < len(history)
  31. # )
  32. W503,
  33. # *Remove bad quotes from multiple lines string*
  34. # https://github.com/zheller/flake8-quotes/blob/4dbc2e/flake8_quotes/__init__.py#L220
  35. # SQL Queries are better written with 'bad quotes'(sic)
  36. # e.g.:
  37. # stmt = """
  38. # UPDATE ShopSignups
  39. # SET first_device_shipment_date = %s
  40. # WHERE shop_id = %s AND first_device_shipment_date IS NULL
  41. # """
  42. Q001,