Files
anki/pyproject.toml
Abdo f5d9b9ef3c chore: Integrate Complexipy for complexity analysis (#4942)
## Linked issue

Closes #4815

## Summary

This adds [Complexipy](https://github.com/rohaquinlop/complexipy) for
detecting complex Python code:
- The `check:complexity` Ninja actions use a high threshold (50) for now
to avoid failing on existing complex code.
- `just complexipy-diff` is intended for linting new code in PR CI and
uses 15 as the threshold. See
https://rohaquinlop.github.io/complexipy/usage-guide/#ratchet-mode

## How to test

- Run `./ninja check:complexity` locally and confirm it passes.
- Test diff mode: `just complexipy-diff main`.
2026-06-04 19:29:37 +03:00

57 lines
1.2 KiB
TOML

[project]
name = "anki-dev"
version = "0.0.0"
description = "Local-only environment"
requires-python = ">=3.12"
classifiers = ["Private :: Do Not Upload"]
[dependency-groups]
dev = [
"pre-commit",
"mypy",
"mypy-protobuf",
"ruff",
"pytest",
"pytest-mock",
"PyChromeDevTools",
"wheel",
"hatchling", # for type checking hatch_build.py files
"mock",
"types-protobuf",
"types-requests",
"types-orjson",
"types-decorator",
"types-flask",
"types-flask-cors",
"types-markdown",
"types-waitress",
"types-pywin32",
"briefcase>=0.4.2",
"coverage>=7.13.5",
"complexipy>=5.5.0",
]
docs = [
"sphinx",
"myst-parser",
"sphinx-book-theme",
"sphinx-autoapi",
"sphinx-autobuild>=2024.10.3",
"click-extra[sphinx]", # for GitHub alerts
"sphinxcontrib-mermaid>=2.0.2",
]
# Local resolution guard; keep in sync with Dependabot cooldown.
[tool.uv]
exclude-newer = "7 days"
exclude-newer-package = { anki-mac-helper = false, anki-audio = false, briefcase = false }
required-version = ">=0.9.25"
[tool.uv.workspace]
members = ["pylib", "qt", "qt/installer/briefcase_plugins"]
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true