[flake8]
# max_line_length = 79
# max-complexity = 10
doctests = true
# https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md
extend-ignore = E203,E501,E701,W503,SC,CNL
# extend-ignore = I  # flake8-import-order: not compatible with isort
# extend-ignore = SC  # flake8-spellcheck: too aggressive
# extend-ignore = CNL  # flake8-class-newline: incompatible with black
# extend-ignore = A003,A005  # Python builtin is shadowed by class attribute / module
# https://docs.astral.sh/ruff/rules/#pydocstyle-d
# extend-ignore = D105  # undocumented-magic-method
# extend-ignore = D107  # undocumented-public-init
extend-select = W504,B950
per-file-ignores =
    */tests/test_*.py: D,T003
    */tests/data/*.py: D,T003,F821
    bpack/utils.py: D103
    bpack/codecs.py: A005
    bpack/typing.py: A005
    bpack/tests/test_future_annotations.py: D,T003,NQA102
statistics = True
count = True
extend-exclude = examples/*

# flake8-cognitive-complexity
# max-cognitive-complexity = 7  # default
max-cognitive-complexity = 12

# flake8-noqa
noqa-require-code = True

# flake8-spellcheck
dictionaries = en_US,python,technical,pandas
# spellcheck-allowlist-file = .spellcheck-allowlist
