content: [build-system]
  requires = ["hatchling>1.24","hatch-requirements-txt>=0.4.1"]
  build-backend = "hatchling.build"
  
  [project]
  name = "pymongocrypt"
  dynamic = ["version", "dependencies", "optional-dependencies"]
  description = "Python bindings for libmongocrypt"
  readme = "README.rst"
  license = {file="LICENSE"}
  requires-python = ">=3.9"
  authors = [
      { name = "Shane Harvey", email = "mongodb-user@googlegroups.com" },
  ]
  keywords = [
      "bson",
      "mongo",
      "mongocrypt",
      "mongodb",
      "pymongo",
      "pymongocrypt",
  ]
  classifiers = [
      "Development Status :: 5 - Production/Stable",
      "Intended Audience :: Developers",
      "License :: OSI Approved :: Apache Software License",
      "Operating System :: MacOS :: MacOS X",
      "Operating System :: Microsoft :: Windows",
      "Operating System :: POSIX",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3 :: Only",
      "Programming Language :: Python :: Implementation :: CPython",
      "Programming Language :: Python :: Implementation :: PyPy",
      "Programming Language :: Python :: 3.9",
      "Programming Language :: Python :: 3.10",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Programming Language :: Python :: 3.13",
      "Programming Language :: Python :: 3.14",
      "Topic :: Database",
  ]
  
  [project.urls]
  Homepage = "https://github.com/mongodb/libmongocrypt/tree/master/bindings/python"
  
  [tool.hatch.version]
  path = "pymongocrypt/version.py"
  validate-bump = false
  
  # Used to call hatch_build.py
  [tool.hatch.build.hooks.custom]
  
  [tool.hatch.metadata.hooks.requirements_txt]
  files = ["requirements.txt"]
  
  [tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
  test = ["requirements-test.txt"]
  
  [tool.ruff.lint]
  select = [
    "E", "F", "W", # flake8
    "B",           # flake8-bugbear
    "I",           # isort
    "ARG",         # flake8-unused-arguments
    "C4",          # flake8-comprehensions
    "EM",          # flake8-errmsg
    "ICN",         # flake8-import-conventions
    "G",           # flake8-logging-format
    "PGH",         # pygrep-hooks
    "PIE",         # flake8-pie
    "PL",          # pylint
    "PT",          # flake8-pytest-style
    "PTH",         # flake8-use-pathlib
    "RET",         # flake8-return
    "RUF",         # Ruff-specific
    "S",           # flake8-bandit
    "SIM",         # flake8-simplify
    "T20",         # flake8-print
    "UP",          # pyupgrade
    "YTT",         # flake8-2020
    "EXE",         # flake8-executable
  ]
  ignore = [
    "PLR",    # Design related pylint codes
    "E501",   # Line too long
    "PT004",  # Use underscore for non-returning fixture (use usefixture instead)
    "UP007",  # Use `X | Y` for type annotation
    "EM101",  # Exception must not use a string literal, assign to variable first
    "EM102",  # Exception must not use an f-string literal, assign to variable first
    "G004",   # Logging statement uses f-string"
    "UP006",  # Use `type` instead of `Type` for type annotation"
    "RET505", # Unnecessary `elif` after `return` statement"
    "RET506", # Unnecessary `elif` after `raise` statement
    "SIM108", # Use ternary operator"
    "PTH123", # `open()` should be replaced by `Path.open()`"
    "SIM102", # Use a single `if` statement instead of nested `if` statements
    "SIM105", # Use `contextlib.suppress(OSError)` instead of `try`-`except`-`pass`
    "ARG002", # Unused method argument:
    "S101",   # Use of `assert` detected
    "SIM114", # Combine `if` branches using logical `or` operator
    "PGH003", # Use specific rule codes when ignoring type issues
    "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
    "EM103",  # Exception must not use a `.format()` string directly, assign to variable first
    "C408",   # Unnecessary `dict` call (rewrite as a literal)
    "SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
    "PLW0603", # Using the global statement to update is discouraged
    "F403" # Unable to detect undefined names
  ]
  unfixable = [
    "RUF100", # Unused noqa
    "T20",  # Removes print statements
    "F841", # Removes unused variables
  ]
  
  [tool.ruff.lint.per-file-ignores]
  "test/*.py" = ["PT", "E402", "PLW", "SIM", "E741", "PTH", "S", "B904", "E722", "T201",
      "RET", "ARG", "F405", "B028", "PGH001", "B018", "F403", "RUF015", "E731", "B007",
      "UP031", "F401", "B023", "F811"]
  "pymongocrypt/crypto.py" = ["ARG001"]
  