# Configuration for flake8 analysis
[flake8]
# Set the maximum length that any line (with some exceptions) may be.
# max-line-length = 120

# Set the maximum length that a comment or docstring line may be.
# max-doc-length = 120

# Set the maximum allowed McCabe complexity value for a block of code.
# max-complexity = 15

# Specify a list of codes to ignore.
# D107: Missing docstring in __init__
# D400: First line should end with a period
# W504: line break after binary operator -> Cannot break line with a long pathlib Path
# D204: 1 blank line required after class docstring
ignore = D107, D400, W504, D204

# Specify a list of mappings of files and the codes that should be ignored for the entirety of the file.
per-file-ignores =
    tests/*:D101,D102,D104

# Provide a comma-separated list of glob patterns to exclude from checks.
exclude =
    # No need to traverse our git directory
    .git,
    # Python virtual environments
    .venv,
    # tox virtual environments
    .tox,
    # There's no value in checking cache directories
    __pycache__,
    # The conf file is mostly autogenerated, ignore it
    docs/conf.py,
    # This contains our built documentation
    build,
    # This contains builds that we don't want to check
    dist,
    # We don't use __init__.py for scripts
    __init__.py
    # example testing folder before going live
    thinking
    # custom scripts, not being part of the distribution
    sdist_upip.py
    setup.py

# Provide a comma-separated list of glob patterns to add to the list of excluded ones.
# extend-exclude =
#     legacy/,
#     vendor/

# Provide a comma-separate list of glob patterns to include for checks.
# filename =
#     example.py,
#     another-example*.py

# Enable PyFlakes syntax checking of doctests in docstrings.
doctests = False

# Specify which files are checked by PyFlakes for doctest syntax.
# include-in-doctest =
#     dir/subdir/file.py,
#     dir/other/file.py

# Specify which files are not to be checked by PyFlakes for doctest syntax.
# exclude-from-doctest =
#     tests/*

# Enable off-by-default extensions.
# enable-extensions =
#     H111,
#     G123

# If True, report all errors, even if it is on the same line as a # NOQA comment.
disable-noqa = False

# Specify the number of subprocesses that Flake8 will use to run checks in parallel.
jobs = auto

# Also print output to stdout if output-file has been configured.
tee = True

# Count the number of occurrences of each error/warning code and print a report.
statistics = True

# Print the total number of errors.
count = True

# Print the source code generating the error/warning in question.
show-source = True

# Decrease the verbosity of Flake8’s output. Each time you specify it, it will print less and less information.
quiet = 0

# Select the formatter used to display errors to the user.
format = pylint

[pydocstyle]
# choose the basic list of checked errors by specifying an existing convention. Possible conventions: pep257, numpy, google.
convention = pep257

# check only files that exactly match <pattern> regular expression
# match = (?!test_).*\.py

# search only dirs that exactly match <pattern> regular expression
# match_dir = [^\.].*

# ignore any functions or methods that are decorated by a function with a name fitting the <decorators> regular expression.
# ignore_decorators =
