[flake8]
# Set line length to 88 characters to match Black's default
max-line-length = 88

# Extend ignore list to be compatible with Black
extend-ignore =
    # E203: whitespace before ':' (conflicts with Black)
    E203,
    # W503: line break before binary operator (conflicts with Black)
    W503,
    # E501: line too long (Black handles this)
    E501,
    # W605: invalid escape sequence (in docstrings with LaTeX, not critical)
    W605

# Exclude common directories that don't need linting
exclude =
    .git,
    __pycache__,
    .venv,
    venv,
    env,
    build,
    dist,
    .eggs,
    *.egg-info,
    benchmark.py

# Set maximum complexity for functions - reduced from 25 to 15 after refactoring
max-complexity = 15

# Per-file ignores
per-file-ignores =
    # F401: Imported but unused - OK in __init__.py for API exports
    __init__.py:F401
    # E402: module level import not at top - needed for environment setup
    leibnet.py:E402
    # F841: Local variable assigned but never used - intentional in tests
    test_*.py:F841
    *_test.py:F841
    # C901: ConvPass.__init__ is inherently complex due to parameter validation
    node_ops.py:C901
