# flake8 configuration.
#
# This lives in a dedicated file rather than pyproject.toml because flake8
# does not read pyproject natively (it needs the Flake8-pyproject plugin).
# The former `[tool.flake8]` block in pyproject.toml was therefore dead
# config -- flake8 silently used its defaults instead.
#
# extend-ignore, in order:
#   F401 unused import       - re-exported names in __init__.py
#   E402 import not at top   - deliberate late imports
#   W503 line break before binary operator - conflicts with black
#   F821 undefined name      - forward refs in Pydantic models
#   D1xx/D2xx/D400           - docstring rules currently failing (27
#                              findings). Staged, not abandoned: the
#                              flake8-docstrings plugin is wired up in
#                              .pre-commit-config.yaml so new code is
#                              checked once these are cleaned up. Remove
#                              codes from this list as they are fixed.
#
# per-file-ignores: the listed modules build their output from long
# triple-quoted f-strings and prompt templates. E501/W291/W293/F541 fire on
# the *literal content* of those strings -- reflowing them would change the
# text tools and prompts return to users, so they are exempted rather than
# "fixed". See specs/001-upgrade-fastmcp-compat/follow-ups.md.

[flake8]
max-line-length = 79
exclude = .venv,.git,docs,venv,bin,lib,deps,build,swagger,migrations,docker,config,apm_modules,.specify
extend-ignore = F401,E402,W503,F821,D100,D101,D103,D202,D205,D209,D400
per-file-ignores =
    src/mcp_server_vss/client.py:E501
    src/mcp_server_vss/models/requests.py:E501
    src/mcp_server_vss/models/vms.py:E501,W293
    src/mcp_server_vss/prompts/backups.py:E501,W291
    src/mcp_server_vss/prompts/vms.py:E501,W291
    src/mcp_server_vss/tools/common.py:E501
    src/mcp_server_vss/tools/backups/host_sessions.py:E501
    src/mcp_server_vss/tools/billing/get_billing_details.py:E501
    src/mcp_server_vss/tools/billing/invoice.py:E501
    src/mcp_server_vss/tools/billing/payment.py:E501
    src/mcp_server_vss/tools/vms/disks.py:E501,W293
    src/mcp_server_vss/tools/vms/resize_vm_resources.py:E501,W293,F541
    src/mcp_server_vss/tools/vms/snapshots.py:E501,W291,W293,F541
    tests/*:D100,D101,D102,D104,D107,E501,F841
