|
| 1 | +# .flake8 |
| 2 | +# |
| 3 | +# DESCRIPTION |
| 4 | +# Configuration file for the python linter flake8. |
| 5 | +# |
| 6 | +# This configuration is based on the generic |
| 7 | +# configuration published on GitHub. |
| 8 | +# |
| 9 | +# AUTHOR |
| 10 | +# krnd |
| 11 | +# |
| 12 | +# VERSION |
| 13 | +# 1.0 |
| 14 | +# |
| 15 | +# SEE ALSO |
| 16 | +# http://flake8.pycqa.org/en/latest/user/options.html |
| 17 | +# http://flake8.pycqa.org/en/latest/user/error-codes.html |
| 18 | +# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes |
| 19 | +# https://gist.github.com/krnd |
| 20 | +# |
| 21 | + |
| 22 | + |
| 23 | +[flake8] |
| 24 | + |
| 25 | +################### PROGRAM ################################ |
| 26 | + |
| 27 | +# Specify the number of subprocesses that Flake8 will use to run checks in parallel. |
| 28 | +jobs = auto |
| 29 | + |
| 30 | + |
| 31 | +################### OUTPUT ################################# |
| 32 | + |
| 33 | +########## VERBOSITY ########## |
| 34 | + |
| 35 | +# Increase the verbosity of Flake8's output. |
| 36 | +verbose = 0 |
| 37 | +# Decrease the verbosity of Flake8's output. |
| 38 | +quiet = 0 |
| 39 | + |
| 40 | + |
| 41 | +########## FORMATTING ########## |
| 42 | + |
| 43 | +# Select the formatter used to display errors to the user. |
| 44 | +format = default |
| 45 | + |
| 46 | +# Print the total number of errors. |
| 47 | +count = True |
| 48 | +# Print the source code generating the error/warning in question. |
| 49 | +show-source = True |
| 50 | +# Count the number of occurrences of each error/warning code and print a report. |
| 51 | +statistics = True |
| 52 | + |
| 53 | + |
| 54 | +########## TARGETS ########## |
| 55 | + |
| 56 | +# Redirect all output to the specified file. |
| 57 | +output-file = .flake8.log |
| 58 | +# Also print output to stdout if output-file has been configured. |
| 59 | +tee = True |
| 60 | + |
| 61 | + |
| 62 | +################### FILE PATTERNS ########################## |
| 63 | + |
| 64 | +# Provide a comma-separated list of glob patterns to exclude from checks. |
| 65 | +exclude = |
| 66 | + # git folder |
| 67 | + .git, |
| 68 | + # python cache |
| 69 | + __pycache__, |
| 70 | + # These files typically just have unused imports |
| 71 | + __init__.py, |
| 72 | +# Provide a comma-separate list of glob patterns to include for checks. |
| 73 | +filename = |
| 74 | + *.py |
| 75 | + |
| 76 | + |
| 77 | +################### LINTING ################################ |
| 78 | + |
| 79 | +########## ENVIRONMENT ########## |
| 80 | + |
| 81 | +# Provide a custom list of builtin functions, objects, names, etc. |
| 82 | +builtins = |
| 83 | + |
| 84 | + |
| 85 | +########## OPTIONS ########## |
| 86 | + |
| 87 | +# Report all errors, even if it is on the same line as a `# NOQA` comment. |
| 88 | +disable-noqa = False |
| 89 | + |
| 90 | +# Set the maximum length that any line (with some exceptions) may be. |
| 91 | +max-line-length = 100 |
| 92 | +# Set the maximum allowed McCabe complexity value for a block of code. |
| 93 | +max-complexity = 10 |
| 94 | +# Toggle whether pycodestyle should enforce matching the indentation of the opening bracket's line. |
| 95 | +# incluences E131 and E133 |
| 96 | +hang-closing = True |
| 97 | + |
| 98 | + |
| 99 | +########## RULES ########## |
| 100 | + |
| 101 | +# ERROR CODES |
| 102 | +# |
| 103 | +# E/W - PEP8 errors/warnings (pycodestyle) |
| 104 | +# F - linting errors (pyflakes) |
| 105 | +# C - McCabe complexity error (mccabe) |
| 106 | + |
| 107 | +# Specify a list of codes to ignore. |
| 108 | +ignore = D4 |
| 109 | +# Specify the list of error codes you wish Flake8 to report. |
| 110 | +# For now we only use the pyflakes errors, but in the future we may want to add |
| 111 | +# more (too noisy right now) |
| 112 | +select = F, E9 |
| 113 | +# Enable off-by-default extensions. |
| 114 | +enable-extensions = |
| 115 | + |
| 116 | + |
| 117 | +########## DOCSTRING ########## |
| 118 | + |
| 119 | +# Enable PyFlakes syntax checking of doctests in docstrings. |
| 120 | +doctests = False |
| 121 | + |
| 122 | +# Specify which files are checked by PyFlakes for doctest syntax. |
| 123 | +include-in-doctest = |
| 124 | +# Specify which files are not to be checked by PyFlakes for doctest syntax. |
| 125 | +exclude-in-doctest = |
| 126 | + |
| 127 | +# tell flake8-rst-docstrings plugin to ignore some custom roles |
| 128 | +# this prevents FP RST303 and RST304 |
| 129 | +rst-roles = py:meth, py:class, py:obj |
| 130 | + |
0 commit comments