content: # Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors.
  # All rights reserved. The contributor(s) of this file has/have agreed to the
  # RapidStream Contributor License Agreement.
  
  
  ################
  #  Formatting  #
  ###############
  
  
  [tool.codespell]
  # 'Implmentation' is intended here as it is a typo by Xilinx and we have conform lol
  ignore-words-list = "din,dout,edn,inout,pres,implmentation,cips,ket"
  
  
  [tool.docformatter]
  style = "google"
  black = true
  
  
  [tool.mypy]
  check_untyped_defs = true
  disallow_any_generics = true
  disallow_incomplete_defs = true
  disallow_subclassing_any = true
  disallow_untyped_calls = true
  disallow_untyped_decorators = true
  disallow_untyped_defs = true
  ignore_missing_imports = true
  no_implicit_reexport = true
  strict = true
  strict_concatenate = true
  strict_equality = true
  strict_optional = true
  warn_no_return = true
  warn_redundant_casts = true
  warn_unused_ignores = false
  warn_return_any = true
  warn_unreachable = true
  
  
  [tool.ruff]
  target-version = "py313"
  
  
  [tool.ruff.lint]
  preview = true
  select = [
    "A",
    "AIR",
    "ANN",
    "ARG",
    "ASYNC",
    "BLE",
    "C",
    "COM",
    "D",
    "E",
    "EM",
    "ERA",
    "EXE",
    "F",
    "FA",
    "FLY",
    # "FURB",  # should be enabled in pathlib refactoring
    "G",
    "I",
    "ICN",
    "INP",
    "INT",
    "ISC",
    "LOG",
    "N",
    "NPY",
    "PD",
    "PERF",
    "PGH",
    "PIE",
    "PL",
    "PT",
    # "PTH",  # should be enabled in pathlib refactoring
    "PYI",
    "Q",
    "R",
    "RET",
    "RSE",
    "RUF",
    "SIM",
    "SLF",
    "SLOT",
    "T",
    "T",
    "TCH",
    "TID",
    "TID",
    "UP",
    "W",
    "YTT",
  ]
  ignore = [
    "COM812",
    "COM819",
    "D1", # allow missing docstrings
    "E111",
    "E114",
    "E117",
    "ISC001",
    "ISC001",
    "ISC002",
    "Q000",
    "Q001",
    "Q002",
    "Q003",
    "UP046",  # Nuitka doesn't support PEP 695, https://github.com/Nuitka/Nuitka/issues/3423
    "W191",
  ]
  
  [tool.ruff.lint.pydocstyle]
  convention = "google"
  
  [tool.ruff.format]
  docstring-code-format = true
  
  
  [tool.pyright]
  exclude = [
    # Please keep sorted
    "**/.*",
    "**/__pycache__",
    "**/node_modules",
    "bazel-*",
    "build",
    "external",
  ]
  