# Authors: The scikit-plots developers
# SPDX-License-Identifier: BSD-3-Clause

[flake8]
# Flake8 settings
# Add additional plugins if necessary for custom linting

# max-line-length = 88  # Same as Black's line length

select =
    # flake8 default
    D, E, F, W

ignore =
    # flake8 default
    E121,E123,E126,E226,E24,E704,W503,W504,
    # Additional ignores:
    E127, E131,
    E266,
    E305, E306,
    E741,
    F841,
    # pydocstyle
    D100, D101, D102, D103, D104, D105, D106,
    D200, D202, D204, D205,
    D301,
    D400, D401, D403, D404,
    # ignored by pydocstyle numpy docstring convention
    D107, D203, D212, D402, D413, D415, D416, D417,
    # while D213 is ignored by the numpy docstring convention, it's left out above,
    # because we want to enforce it.

# it's not a bug that we aren't using all of hacking
extend-ignore =
    # H101: Use TODO(NAME)
    # H101,
    # H202: assertRaises Exception too broad
    # H202,
    # H233: Python 3.x incompatible use of print operator
    # H233,
    # H301: one import per line
    # H301,
    # H306: imports not in alphabetical order (time, os)
    # H306,
    # H401: docstring should not start with a space
    # H401,
    # H403: multi line docstrings should end on a new line
    # H403,
    # H404: multi line docstring should start without a leading new line
    # H404,
    # H405: multi line docstring summary not separated with an empty line
    # H405,
    # H501: Do not use self.__dict__ for string formatting
    # H501,
    E202, E203, E221, E251, E265, E302, E303, F401, E402, E501, E702, E703, E722

exclude =
    # No need to traverse our git directory
    .git,
    # There's no value in checking cache directories
    **__pycache__/**,
    # External files.
    benchmarks/**,
    tools/**,                               # ← Ensure the `tools/` folder is ignored
    galleries/examples/**,                  # ← Ensure the `examples/` folder is ignored
    # The conf file is mostly autogenerated, ignore it
    docs/source/conf.py,
    docs/source/_sphinx_ext/**,
    docs/source/auto_examples/**,
    # The old directory contains Flake8 2.0
    old,
    # This contains our built documentation
    build/**,
    # This contains builds of flake8 that we don't want to check
    dist/**,
    .eggs,
    # External files.
    .tox,
    dev.py,
    ## module
    scikitplot/_build_utils/**,             # ← Ensure the `tools/` folder is ignored
    scikitplot/_factory_api/**,             # ← Ensure the `tools/` folder is ignored
    scikitplot/_lib/**,                     # ← Ensure the `tools/` folder is ignored
    scikitplot/_utils/**,                   # ← Ensure the `tools/` folder is ignored
    scikitplot/api/**,                      # ← Ensure the `tools/` folder is ignored
    scikitplot/cexperimental/**,             # ← Ensure the `tools/` folder is ignored
    scikitplot/cexternals/**,                # ← Ensure the `tools/` folder is ignored
    scikitplot/experimental/**,             # ← Ensure the `tools/` folder is ignored
    scikitplot/externals/**,                # ← Ensure the `tools/` folder is ignored
    scikitplot/kds/**,                      # ← Ensure the `tools/` folder is ignored
    scikitplot/modelplotpy/**,              # ← Ensure the `tools/` folder is ignored
    scikitplot/visualkeras/**,              # ← Ensure the `tools/` folder is ignored
    scikitplot/_preprocess.py,

per-file-ignores =
    scikitplot/kds/_kds.py: D412, E225, E231, E261, E262, D412

    scikitplot/visualkeras/layered.py: F405
