content: # THIS IS NOT DESCRIBING A PACKAGE, but the DEV environment of this mono-repo
  # In order to install the packages of this mono-repo from source, refer to the pyproject.toml in the relevant folder
  
  [project]
  authors = [
    {name = "Vizro Team"}
  ]
  dynamic = ["version"]
  name = "vizro"
  
  [tool.bandit]
  exclude_dirs = ["tests"]
  
  [tool.codespell]
  builtin = "clear,rare,en-GB_to_en-US"
  ignore-words-list = "grey,ned,sav,Thur"
  skip = "*.min.css.map,*.min.css,.vale/*, *assets/*,.github/*"
  
  [tool.mypy]
  # strict checks : strict = true
  check_untyped_defs = true
  disable_error_code = "call-arg"  # https://github.com/python/mypy/issues/14850 seems to not fix it
  disallow_any_generics = true
  disallow_incomplete_defs = false
  disallow_subclassing_any = false
  disallow_untyped_calls = false
  disallow_untyped_decorators = false
  disallow_untyped_defs = false
  no_implicit_optional = true
  no_implicit_reexport = false
  plugins = ["pydantic.mypy"]
  strict_equality = true
  warn_redundant_casts = true
  warn_return_any = false
  warn_unused_configs = true
  warn_unused_ignores = true
  
  [[tool.mypy.overrides]]
  disable_error_code = "name-defined"
  module = "vizro.models.types"
  
  [tool.pydantic-mypy]
  init_forbid_extra = true
  init_typed = true
  warn_required_dynamic_aliases = true
  warn_untyped_fields = true
  
  [tool.ruff]
  line-length = 120
  
  [tool.ruff.format]
  docstring-code-format = true
  
  [tool.ruff.lint]
  # see: https://beta.ruff.rs/docs/rules/
  ignore = [
    "D104",  # undocumented-public-package
    "D401",  # first-line should be in imperative mood
    # D407 needs to be ignored as it otherwise messes up the formatting in our API docs
    "D407",  # missing dashed underline after section
    "PD901",  # allow using the generic variable name `df` for DataFrames
    "PLC0415"  # `import` should be at the top-level of a file
  ]
  select = [
    "E",  # pycodestyle errors for style conventions of PEP 8
    "W",  # pycodestyle warnings  for style conventions of PEP 8
    "F",  # pyflakes for Python errors
    "I",  # isort for sorting imports
    "D",  # pydocstyle for docstrings
    "T201",  # flake8-print for detecting print statement
    "C4",  # flake8-comprehensions for better list/set/dict comprehensions
    "RUF",  # Ruff-specific rules
    "PL",  # pylint
    "PD",  # pandas-vet for linting pandas code
    "UP",  # pyupgrade for upgrading syntax to new Python versions
    "PERF",  # perflint for performance anti-patterns
    "FURB"  # refurb for reburbishing and modernizing
  ]
  
  [tool.ruff.lint.per-file-ignores]
  # Tests can use magic values, assertions, and relative imports, ignore missing docstrings,
  # compare to empty string
  "**/tests/**" = ["PLR2004", "S101", "TID252", "D100", "D101", "D102", "D103", "PLC1901", "RUF012"]
  # Ignore import violations in all __init__.py files
  "__init__.py" = ["E402", "F401"]
  
  [tool.ruff.lint.pydocstyle]
  convention = "google"
  
  [tool.ruff.lint.pylint]
  max-args = 6
  
  [tool.ruff.lint.pyupgrade]
  # Don't do PEP 604 rewrites (e.g. Union[str, int] -> str | int), even in files that import
  # `from __future__ import annotations`. This is needed since pydantic relies on the runtime behavior in Python 3.9.
  # When we drop Python 3.9 we can remove this setting.
  keep-runtime-typing = true
  