# Configure flake8

[flake8]
max-line-length = 88
max-doc-length = 79
ignore =
    # Too many leading '#' for block comment
    E266,
    # Line too long (82 > 79 characters)
    E501,
    # Do not use variables named 'I', 'O', or 'l'
    E741,
    # Line break before binary operator (conflicts with black)
    W503,
    # Functions too long. The kernels will end up a bit long but not complex.
    CFQ001,
    # Number of arguments. Kernels take only scalars (no lists or arrays)
    CFQ002,
exclude =
    .git,
    __pycache__,
    .ipynb_checkpoints,
    doc/_build,
per-file-ignores =
    # disable unused-imports errors on __init__.py
    __init__.py: F401
    # disable unused arguments in kernel files
    _kernels.py: U100

# Configure flake8-rst-docstrings
# -------------------------------
# Add some roles used in our docstrings
rst-roles =
    class,
    func,
    mod,
    meth,
    ref,
# Ignore "Unknown target name" raised on citations
extend-ignore = RST306
