Permalink
Browse files

Add flake8 plugins and configuration

  • Loading branch information...
osteele committed Feb 8, 2018
1 parent 730c1be commit e57c7d708fa6b26cb19034eeffade71b512c1de6
Showing with 16 additions and 0 deletions.
  1. +10 −0 requirements.txt
  2. +6 −0 setup.cfg
@@ -9,6 +9,16 @@ tox

# Linting
flake8
# I generally run with these:
mccabe # report functions with high complexity
flake8-bandit # security testing
flake8-bugbear # likely bugs and design problems
flake8-builtins # using a Python built-in as a variable name
flake8-docstrings # doc string format
# Sometimes I use this:
# flake8-comprehensions
# I just discovered this:
flake8-mock # mock methods that don't look like they'd assert but don't

# Example gateway
profanityfilter~=2.0.3
@@ -7,4 +7,10 @@ ignore =
D101 # Missing docstring in public class
D102 # Missing docstring in public method
D103 # Missing docstring in public function
# Other warnings, and why they're okay.
B101 # asserts are okay in test code
B311 # this isn't cryptographic code
B322 # inputs are okay in Python 3
B404 # we know what we're doing. And, don't seem able to disable at file level
max-complexity = 15
max-line-length = 120

0 comments on commit e57c7d7

Please sign in to comment.