Add a basic flake8 configuration

This commit is contained in:
Sanchayan Maity 2021-11-30 15:39:02 +05:30
parent 8db10794e4
commit 279f55988e
1 changed files with 80 additions and 0 deletions

80
flake8/.config/flake8 Normal file
View File

@ -0,0 +1,80 @@
[flake8]
# Specify the number of subprocesses that Flake8 will use to run checks in parallel.
jobs = auto
# Select the formatter used to display errors to the user.
format = default
# Print the total number of errors.
count = True
# Print the source code generating the error/warning in question.
show-source = True
# Count the number of occurrences of each error/warning code and print a report.
statistics = True
# Provide a comma-separated list of glob patterns to exclude from checks.
exclude =
# git folder
.git,
# python cache
__pycache__,
# pytest cache
.pytest_cache,
# mypy cache
.mypy_cache
# Provide a comma-separate list of glob patterns to include for checks.
filename =
*.py
# Provide a custom list of builtin functions, objects, names, etc.
builtins =
# Report all errors, even if it is on the same line as a `# NOQA` comment.
disable-noqa = False
# Set the maximum length that any line (with some exceptions) may be.
max-line-length = 160
# Set the maximum allowed McCabe complexity value for a block of code.
max-complexity = 10
# Toggle whether pycodestyle should enforce matching the indentation of the opening brackets line.
# incluences E131 and E133
hang-closing = True
# 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
#
# Specify a list of codes to ignore.
ignore = E133,E501,W503
# Specify the list of error codes you wish Flake8 to report.
select =
E,
W,
F,
C
# 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 =
# 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 =