[flake8]
# ANN: Annotations
# A:   builtins
# B:   bugbear
# B9:  bugbear future proof
# BLK: black
# C:   mccabe / comprehensions
# D:   docstring
# E:   pycodestyle errors
# F:   pyflakes warnings
# I:   import-order
# M:   flake8 extension for mutable default arguments
# RST: restructured text
# W:   pycodestyle warnings
# Y:   type hinting in stub files
# select = B,B9,BLK,C,D,E,F,I,S,W

;filename =
;     No need to traverse our git directory
;    "src/",
;    # This contains builds of flake8 that we don't want to check
;    "tests/",
;    # There's no value in checking cache directories
;    "examples/",
;    # sphinx config
;    "docs/conf.py",
;    # run files
;    "run/",
;    # dev files
;    "dev/",

max-line-length = 120

ignore =
    E203,    # whitespace before ':'
;    E221,  # multiple spaces before operator
;    E226,  # missing whitespace around arithmetic operator
;    E241,  # multiple spaces after ':'
    W503,    # line break before binary operator
    ANN101,  # Missing type annotation for self in method
    ANN102,  # Missing type annotation for cls in classmethod
    ANN401,  # Dynamically typed expressions (typing.Any) are disallowed
    E741,    # ambiguous variable nam

extend-ignore =
    # Google Python style is not RST until after processed by Napoleon
    # See https://github.com/peterjc/flake8-rst-docstrings/issues/17
    RST201,     # Unexpected indentation.
    RST203,     # Definition list ends without a blank line; unexpected unindent.
    RST301,     # Block quote ends without a blank line; unexpected unindent.
;    RST303,     # Unknown directive type
;    RST304,     # Unknown interpreted text role
;    ANN101,     # Missing type annotation for self in method
;    ANN201,     # Missing return type annotation for public function
    D407,       # Missing dashed underline after section

exclude =
    ./.git,
    ./build,
    ./scripts,
    ./venv,
    *.pyi,
    ./dev,

# Annotations plugin
# Suppress ANN200-level errors for functions that have no return (return None)
suppress-none-returning = True
allow-untyped-defs = True

# docstring plugin
docstring-convention = numpy

rst-roles =
    mod,
    func,
    data,
    const,
    class,
    meth,
    attr,
    exc,
    obj,

rst-directives=
    Signature,
