# Flake8 configuration for claude-mpm
# Traditional Python linter for additional checks

[flake8]
# Maximum line length (matching Black)
max-line-length = 88

# Maximum complexity for functions
max-complexity = 10

# Extend default ignores
extend-ignore =
    # Whitespace before ':' (Black compatibility)
    E203,
    # Block comment formatting - stylistic preference
    E265,
    # Expected blank lines - stylistic preference
    E301,
    # Module level import not at top - common pattern
    E402,
    # Line too long (handled by Black formatter)
    E501,
    # Type comparison using type() - intentional in some cases
    E721,
    # Bare except - intentional in some cases
    E722,
    # Ambiguous variable name - too many to fix now
    E741,
    # Trailing whitespace - handled by formatter
    W291,
    # Blank line contains whitespace - handled by formatter
    W293,
    # Line break before binary operator (Black compatibility)
    W503,
    # Function is too complex - too many to fix now
    C901,
    # Unused imports - too many to fix now
    F401,
    # Import shadowed by loop variable - false positives
    F402,
    # Star imports - used in compatibility layers
    F403,
    # Redefinition of unused name - intentional in some cases
    F811,
    # Unused global - false positives
    F824,
    # Unused local variable - too many to fix now
    F841,
    # Missing docstring in public module
    D100,
    # Missing docstring in public class
    D101,
    # Missing docstring in public method
    D102,
    # Missing docstring in public function
    D103,
    # Missing docstring in public package
    D104,
    # Missing docstring in magic method
    D105,
    # One-line docstring should fit on one line
    D200,

# Exclude directories
exclude =
    .git,
    __pycache__,
    .venv,
    .venv-*,
    venv,
    env,
    test_env,
    tests/test_env,
    build,
    dist,
    *.egg-info,
    .pytest_cache,
    .mypy_cache,
    .ruff_cache,
    node_modules,
    dashboard_*,
    realtime_*,
    test_screenshots,

# Per-file ignores
per-file-ignores =
    # Allow unused imports in __init__ files
    __init__.py:F401,F403
    # Allow print statements and assertions in tests
    tests/*.py:S101,S102,E402,F401,F821,F841,E722
    # Allow complex logic and other issues in scripts
    scripts/*.py:C901,E402,F401,F821,F841,E722

# Enable additional plugins
# Note: These need to be installed separately
# pip install flake8-import-order flake8-tidy-imports flake8-bugbear
enable-extensions =
    # Import order checking
    I001, I002, I003, I004, I005,
    # Tidy imports
    TID251,
    # Bugbear warnings
    B001, B002, B003, B004, B005, B006, B007, B008,

# Import order style (matching isort with Black)
import-order-style = google
application-import-names = claude_mpm