exclude = [
    "venv",
    ".git",
    ".ruff_cache",
    ".vscode",

    "modules/cfgzero",
    "modules/facelib",
    "modules/flash_attn_triton_amd",
    "modules/hidiffusion",
    "modules/intel/ipex",
    "modules/pag",
    "modules/schedulers",
    "modules/teacache",

    "modules/control/proc",
    "modules/control/units",
    "modules/control/units/xs_pipe.py",
    "modules/postprocess/aurasr_arch.py",

    "pipelines/meissonic",
    "pipelines/omnigen2",
    "pipelines/hdm",
    "pipelines/segmoe",

    "scripts/lbm",
    "scripts/xadapter",
    "scripts/pulid",
    "scripts/instantir",
    "scripts/freescale",
    "scripts/consistory",

    "repositories",

    "extensions-builtin/Lora",
    "extensions-builtin/sd-extension-chainner/nodes",
    "extensions-builtin/sd-webui-agent-scheduler",
    "extensions-builtin/sdnext-modernui/node_modules",
]
line-length = 250
indent-width = 4
target-version = "py39"

[lint]
select = [
  "F",
  "E",
  "W",
  "C",
  "B",
  "I",
  "YTT",
  "ASYNC",
  "RUF",
  "AIR",
  "NPY",
  "C4",
  "T10",
  "EXE",
  "ISC",
  "ICN",
  "RSE",
  "TCH",
  "TID",
  "INT",
  "PLE",
]
ignore = [
  "B006",   # Do not use mutable data structures for argument defaults
  "B008",   # Do not perform function call in argument defaults
  "C420",   # Unnecessary dict comprehension for iterable; use `dict.fromkeys` instead
  "C408",   # Unnecessary `dict` call
  "I001",   # Import block is un-sorted or un-formatted
  "E402",   # Module level import not at top of file
  "E501",   # Line too long
  "E721",   # Do not compare types, use `isinstance()`
  "E731",   # Do not assign a `lambda` expression, use a `def`
  "E741",   # Ambiguous variable name
  "F401",   # Imported by unused
  "NPY002", # replace legacy random
  "RUF005", # Consider iterable unpacking
  "RUF008", # Do not use mutable default values for dataclass
  "RUF010", # Use explicit conversion flag
  "RUF012", # Mutable class attributes
  "RUF013", # PEP 484 prohibits implicit `Optional`
  "RUF015", # Prefer `next(...)` over single element slice
  "RUF046", # Value being cast to `int` is already an integer
  "RUF059", # Unpacked variables are not used
  "RUF051", # Prefer pop over del
]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = false

[lint.mccabe]
max-complexity = 150
