# .flake8
#
#
# SEE ALSO
# http://flake8.pycqa.org/en/latest/user/options.html
# http://flake8.pycqa.org/en/latest/user/error-codes.html
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
# https://gist.github.com/krnd
#
[flake8]
# Specify the number of subprocesses that Flake8 will use to run checks in parallel.
jobs = auto
# Increase the verbosity of Flake8’s output.
verbose = 0
# Decrease the verbosity of Flake8’s output.
quiet = 0
# Select the formatter used to display errors to the user.
format = default
# Print the total number of errors.
count = False
# Print the source code generating the error/warning in question.
show-source = False
# Count the number of occurrences of each error/warning code and print a report.
statistics = False
# Redirect all output to the specified file.
output-file = .flake8.log
# Also print output to stdout if output-file has been configured.
tee = True
# Provide a comma-separated list of glob patterns to exclude from checks.
exclude = .git, __pycache__, .pytest_cache, .mypy_cache, app/model/pg/migrations/versions, .venv, tests
# Provide a comma-separate list of glob patterns to include for checks.
filename = *.py
# Set the maximum length that any line (with some exceptions) may be.
max-line-length = 100
# Set the maximum allowed McCabe complexity value for a block of code.
max-complexity = 18
# Toggle whether pycodestyle should enforce matching the indentation of the opening bracket’s line.
# incluences E131 and E133
# hang-closing = True
########## Rules ##########
# ERROR CODES
#
# E/W - PEP8 errors/warnings (pycodestyle)
# F - linting errors (pyflakes)
# C - McCabe complexity error (mccabe)
#
# E133 - closing bracket is missing indentation (conflicts with black)
# E203 - whitespace before ‘:’ (conflicts with black)
# W503 - line break before binary operator
# F401 - module imported but unused
# F403 - ‘from module import *’ used; unable to detect undefined names
# E731 allow lambda expressions
# Specify a list of codes to ignore.
ignore = E133, E203, E266, W503, E731, W291
; ignore = E203, E266, E501, W503, B905, B907 # black ignore list
# Specify the list of error codes you wish Flake8 to report.
select = E, W, F, C, T4,
; select = B, C, E, F, W, T4, B9 # black select list
# Specify a list of mappings of files and the codes that should be ignored for the entirety of the
# file.
per-file-ignores = __init__.py:F401,F403
# Enable off-by-default extensions.
enable-extensions =
########## Docstring ##########
# Enable PyFlakes syntax checking of doctests in docstrings.
doctests = True
# Specify which files are checked by PyFlakes for doctest syntax.
include-in-doctest =
# Specify which files are not to be checked by PyFlakes for doctest syntax.
exclude-in-doctest =