Django semantic extension for ty-extended.
Project description
django-ty
django-ty adds Django ORM semantics to ty-extended. It installs Django,
the checker runtime, and a packaged Django static API for Django 5.0-6.0.
Install
uv add django-ty
Installed plugin discovery is deliberately opt-in. Add this to the project configuration:
[tool.ty.plugins]
auto-discover = true
Then run:
uv run ty check .
No installer command, .ty directory, or file copy is needed.
Coverage
The complete pinned static API is packaged inside the wheel. No upstream
django-stubs, django-stubs-ext, or mypy-plugin distribution is installed.
Utilities supplied by django-stubs-ext, including WithAnnotations, are
intentionally outside django-ty's product surface. django-ty handles Django
model fields, forward and reverse relations, model-specific managers, queryset
result types, values(), values_list(), basic annotate(), and literal lookup
validation.
The measured feature parity is 100.0% against pinned mypy 2.1.0 with
django-stubs 6.0.6: all 82 of 82 in-scope reference outcomes match. The exact
behavior is in the
compatibility map.
It is generated by running both checkers against the same 82 assertions and is
reproduced in CI. Hand-assigned statuses and weights are not used.
Development
uv run --no-project --python 3.11 python scripts/evaluate_django_stubs_coverage.py --check
uv run --no-project --python 3.11 python -m unittest tests/test_compatibility_value.py tests/test_evaluate_differential_conformance.py
bash scripts/differential-conformance.sh --check
cargo test --locked
cargo llvm-cov --locked --all-targets --summary-only --fail-under-lines 98
bash scripts/e2e.sh
To refresh the vendored static API from the reviewed pinned checkout:
uv run --no-project --python 3.11 python scripts/vendor_django_static_api.py --upstream-root /path/to/django-stubs-6.0.6
bash scripts/differential-conformance.sh --write
uv run --no-project --python 3.11 python scripts/evaluate_django_stubs_coverage.py --write --check
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_ty-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_ty-0.1.1-py3-none-any.whl
- Upload date:
- Size: 754.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cdbcbfee9aaf1e8062f400a26963d0f30f48c10c788b275b7b109e4ab9e9d1f
|
|
| MD5 |
7f2ee03d79b05dfda9beea27a2a91a4d
|
|
| BLAKE2b-256 |
c9bed1df80b9ad25788e0037a266477f3ac573f584bad409c4b4f3f5c4f0b6cb
|