# Flake8 configuration
# https://flake8.pycqa.org/en/latest/user/configuration.html

[flake8]
# Maximum line length
max-line-length = 100

# Maximum complexity
max-complexity = 10

# Select specific error codes to check
select = B,C,E,F,W,B9

# Ignore specific error codes
ignore =
    # E203: whitespace before ':' (conflicts with black)
    E203,
    # E501: line too long (handled by max-line-length)
    E501,
    # W503: line break before binary operator (conflicts with black)
    W503,
    # D100: Missing docstring in public module
    D100,
    # D104: Missing docstring in public package
    D104,
    # D107: Missing docstring in __init__
    D107,

# Exclude directories
exclude =
    .git,
    __pycache__,
    .venv,
    venv,
    build,
    dist,
    *.egg-info,
    .eggs,
    .tox,
    .mypy_cache,
    .pytest_cache,

# Per-file ignores
per-file-ignores =
    # Tests can have missing docstrings and assertions
    tests/*:D,S101
    # __init__.py files can be empty
    __init__.py:F401,D

# Show source code for each error
show-source = true

# Show statistics at the end
statistics = true

# Count errors
count = true

# Docstring convention (Google style)
docstring-convention = google

