content: [project]
  name = "django-stubs"
  version = "5.2.7"
  description = "Mypy stubs for Django"
  readme = "README.md"
  license = "MIT"
  license-files = ["LICENSE.md"]
  requires-python = ">=3.10"
  authors = [
    { name = "Maksim Kurnikov", email = "maxim.kurnikov@gmail.com" },
  ]
  maintainers = [
    { name = "Marti Raudsepp", email = "marti@juffo.org" },
    { name = "Nikita Sobolev", email = "mail@sobolevn.me" },
    { name = "Petter Friberg", email = "petter_friberg@hotmail.com" },
    { name = "Adam Johnson", email = "me@adamj.eu" },
  ]
  classifiers = [
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Typing :: Typed",
    "Framework :: Django",
    "Framework :: Django :: 5.0",
    "Framework :: Django :: 5.1",
    "Framework :: Django :: 5.2",
  ]
  dependencies = [
    "django",
    "django-stubs-ext>=5.2.7",
    "tomli; python_version < '3.11'",
    # Types:
    "types-pyyaml",
    "typing-extensions>=4.11.0",
  ]
  
  [project.optional-dependencies]
  compatible-mypy = ["mypy>=1.13,<1.19"]
  oracle = ["oracledb"]
  redis = ["redis", "types-redis"]
  
  [dependency-groups]
  tests = [
    # Dev tools:
    "pytest==8.4.2",
    "pytest-mypy-plugins==3.2.0",
    "pytest-shard==0.1.2",
    "pytest-xdist==3.8.0",
    # Django deps:
    "django==5.2.6",
    "mysqlclient==2.2.7",
    "psycopg2-binary==2.9.10",
    "jinja2==3.1.6",
    "pyyaml==6.0.2",
    # typing:
    "mypy==1.18.1",
    "django-stubs[compatible-mypy,oracle,redis]",
  ]
  pyright = [
    "pyright==1.1.405",
  ]
  
  dev = [
    {include-group = "tests"},
    {include-group = "pyright"},
  ]
  
  [project.urls]
  Homepage = "https://github.com/typeddjango/django-stubs"
  Funding = "https://github.com/sponsors/typeddjango"
  "Release notes" = "https://github.com/typeddjango/django-stubs/releases"
  
  [tool.uv.sources]
  django-stubs = { workspace = true }
  django-stubs-ext = { workspace = true }
  
  [tool.uv.workspace]
  members = ["ext"]
  
  [build-system]
  requires = ["uv_build>=0.8.22,<0.9.0"]
  build-backend = "uv_build"
  
  [tool.uv.build-backend]
  module-name = ["django-stubs", "mypy_django_plugin"]
  module-root = ""
  
  [tool.codespell]
  ignore-words-list = "aadd,acount,nam,asend"
  
  [tool.ruff]
  # Adds to default excludes: https://ruff.rs/docs/settings/#exclude
  line-length = 120
  target-version = "py310"
  
  [tool.ruff.lint]
  # See Rules in Ruff documentation: https://beta.ruff.rs/docs/rules/
  select = [
    "B",        # bugbear
    "E",        # pycodestyle
    "F",        # pyflakes
    "FURB",     # refurb
    "INP",      # flake8-tidy-imports
    "W",        # pycodestyle
    "I",        # isort
    "ISC001",   # Implicitly concatenated string literals on one line
    "ISC002",   # Implicitly concatenated string literals over multiple lines
    "UP",       # pyupgrade
    "TID251",   # Disallowed imports (flake8-tidy-imports.banned-api)
    "PYI",      # flake8-pyi
    "RUF100",   # Equivalent to flake8-noqa NQA103
    "PGH004",   # Equivalent to flake8-noqa NQA104
    "PGH003",   # Disallowed blanket `type: ignore` annotations.
    "RET504",   # Unnecessary assignment to {name} before return statement
    "RET505",   # Unnecessary {branch} after return statement
    "RET506",   # Unnecessary {branch} after raise statement
    "RET507",   # Unnecessary {branch} after continue statement
    "RET508",   # Unnecessary {branch} after break statement
    "RUF",      # Ruff specific rules
    "TC",       # flake8-type-checking
  ]
  ignore = [
    "PYI021", # We have a few meaningful docstrings for stubs only constructs/utilities.
    "PYI041", # This might not be obvious that `float | int` is mostly equivalent to `float` typing wise | int | str
    "PYI043",
  ]
  
  [tool.ruff.lint.per-file-ignores]
  "*.pyi" = [
    "B",
    "E501",
    "E741",
    "E743",
    "F403", # Use wildcard import
    "F405",
    "F822",
    "F821",
  ]
  "tests/*.py" = ["INP001", "PGH003", "RUF012"]
  "ext/tests/*.py" = ["INP001"]
  "setup.py" = ["INP001"]
  
  [tool.ruff.lint.flake8-tidy-imports.banned-api]
  "_typeshed.Self".msg = "Use typing_extensions.Self (PEP 673) instead. If you type a metaclass, add a noqa"
  "typing.assert_type".msg = "Only available in Python 3.11 and above. Use `typing_extensions.assert_type` instead."
  "typing.Self".msg = "Only available in Python 3.11 and above. Use `typing_extensions.Self` instead."
  
  [tool.ruff.lint.isort]
  known-first-party = ["django_stubs_ext", "mypy_django_plugin"]
  split-on-trailing-comma = false
  