[flake8]
count = true

ignore =
    A003,      # class attribute is shadowing a builtin
    CFQ004,    # Function has too many returns.
    CFQ002,    # Function has too many arguments.
    D102,      # Missing docstring in public method.
    D105,      # Magic methods not having a docstring.
    D412,      # No blank lines allowed between a section header and its content
    E402,      # Module level import not at top of file (isn't compatible with our import style).
    IFSTMT001  # "use a oneliner here".
    T101,      # TO-DO comment detection (T102 is FIX-ME and T103 is XXX).
    W503,      # line break before binary operator.
    W504,      # line break before binary operator (again, I guess).
    S101,      # Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
    E203,      # whitespace before ':'
    E231,      # missing whitespace after ','

# F403: cannot detect unused vars if we use starred import
# F405: __all__ field may be undefined or defined from star imports
per-file-ignores =
    # Doc errors don't matter in the tests
    tests/*.py:         D100, D104

max-complexity =        20
max-function-length =   100
# Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this.
max-line-length =       130
show_source =           False
statistics =            False

accept-encodings =      utf-8
docstring-convention =  numpy
exclude =
    alluka/_vendor/
