A hyper-fast Python docstring cross-reference checker
Project description
drefs
An extremely fast Python docstring cross-reference checker, written in Rust.
Validating cross-references in tinygrad (697 Python files). ~460x faster.
Usage
uvx drefs .
src/my_pkg/models.py:12:5: DREF001 Unresolved reference `my_pkg.old_module.Foo`
src/my_pkg/views.py:45:9: DREF001 Unresolved reference `Nonexistent`
Found 2 errors.
That's it.
Supported syntax
- MkDocs:
[text][pkg.mod.Class],[pkg.mod.Class][] - Sphinx:
:class:`pkg.mod.Class` - Rust-style:
[Symbol],[`Symbol`],[pkg.mod.Class]
[User] resolves via the current file's imports. [pkg.models.User] resolves directly. Escape with \[not a ref\].
drefs understands __init__.py re-exports, inheritance chains, and self.x attributes.
Configuration
Optional. Add to pyproject.toml:
[tool.drefs]
src = ["src"] # auto-detected if omitted
style = "auto" # "mkdocs" | "sphinx" | "auto"
inventories = [ # validate against external symbols
"https://docs.python.org/3/objects.inv",
]
Editor support
PyCharm / IntelliJ
- Ctrl+Click on each segment of a dotted path
- Syntax highlighting on cross-references
- Red squiggles on broken references
Install from editors/pycharm/build/distributions/drefs-pycharm-*.zip via Settings > Plugins > Install from Disk.
Contributing
See CONTRIBUTING.md.
License
MIT
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 Distribution
Built Distributions
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 drefs-0.1.0.tar.gz.
File metadata
- Download URL: drefs-0.1.0.tar.gz
- Upload date:
- Size: 107.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56057dfd22eb75ff384cd23715c62ce6a2357838acecd3d89d0fdd71bd582073
|
|
| MD5 |
2624a3636c3e3e831a8c5fdc821d635b
|
|
| BLAKE2b-256 |
79cbdef2a8028e9d55ec0c5ae33c227fa9b5351b497579530f6b1851d31da6b5
|
Provenance
The following attestation bundles were made for drefs-0.1.0.tar.gz:
Publisher:
release.yml on scriptogre/drefs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
drefs-0.1.0.tar.gz -
Subject digest:
56057dfd22eb75ff384cd23715c62ce6a2357838acecd3d89d0fdd71bd582073 - Sigstore transparency entry: 1317066041
- Sigstore integration time:
-
Permalink:
scriptogre/drefs@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scriptogre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file drefs-0.1.0-py3-none-win_amd64.whl.
File metadata
- Download URL: drefs-0.1.0-py3-none-win_amd64.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4075ab2b5dab31c5c7ece5fd70b047a8bf2932e21b0798230e0698dfa3644eb
|
|
| MD5 |
36a6c135645972c3d492a6b292fe6213
|
|
| BLAKE2b-256 |
a9f747fdd1ffa0d9c2bbc245eb04bbfc74da76e500dccaedc30338217ffaf130
|
Provenance
The following attestation bundles were made for drefs-0.1.0-py3-none-win_amd64.whl:
Publisher:
release.yml on scriptogre/drefs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
drefs-0.1.0-py3-none-win_amd64.whl -
Subject digest:
f4075ab2b5dab31c5c7ece5fd70b047a8bf2932e21b0798230e0698dfa3644eb - Sigstore transparency entry: 1317066086
- Sigstore integration time:
-
Permalink:
scriptogre/drefs@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scriptogre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file drefs-0.1.0-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: drefs-0.1.0-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91095aa647c6d92f83c4d840a63fefef542c2e7dda1bbae77cc32f80a3a6b4a3
|
|
| MD5 |
9c38ae3d2acb127d2103fb482a8a919e
|
|
| BLAKE2b-256 |
4dc63420c7fdeb5b13b6375fb5a4817a649a9e6f9d7076c57ed82d7e580e9904
|
Provenance
The following attestation bundles were made for drefs-0.1.0-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on scriptogre/drefs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
drefs-0.1.0-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
91095aa647c6d92f83c4d840a63fefef542c2e7dda1bbae77cc32f80a3a6b4a3 - Sigstore transparency entry: 1317066076
- Sigstore integration time:
-
Permalink:
scriptogre/drefs@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scriptogre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file drefs-0.1.0-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: drefs-0.1.0-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c2b6136cfb5f644a47e73e6d044937c9901e7cf17330fed973dec3c2768e3bb
|
|
| MD5 |
09a30b5f91cea37aa0cf997dbf96a895
|
|
| BLAKE2b-256 |
ae05488e1d3aa8b3279748b2efe31103428cf54d2b48d0477ef12f857201a64a
|
Provenance
The following attestation bundles were made for drefs-0.1.0-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on scriptogre/drefs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
drefs-0.1.0-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
8c2b6136cfb5f644a47e73e6d044937c9901e7cf17330fed973dec3c2768e3bb - Sigstore transparency entry: 1317066057
- Sigstore integration time:
-
Permalink:
scriptogre/drefs@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scriptogre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file drefs-0.1.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: drefs-0.1.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cda116e30cb6d0d033949341eb8a63faeeaa3c010a6a75b371def8a40969bb0
|
|
| MD5 |
639cb62a638eed7afc10d6a6586f199d
|
|
| BLAKE2b-256 |
bc04b0493e4642b29470f1f8d5c600a53cac6f79dcce007372335a5518ca2684
|
Provenance
The following attestation bundles were made for drefs-0.1.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on scriptogre/drefs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
drefs-0.1.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
6cda116e30cb6d0d033949341eb8a63faeeaa3c010a6a75b371def8a40969bb0 - Sigstore transparency entry: 1317066067
- Sigstore integration time:
-
Permalink:
scriptogre/drefs@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scriptogre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file drefs-0.1.0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: drefs-0.1.0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
961a03fbe5d7172c4f7b5d4eceae5b0e9274155af20921cfcf70043f35094e7b
|
|
| MD5 |
a0b80cc5c383648e00043b15dd5f3656
|
|
| BLAKE2b-256 |
5e7b886782068ba45aa8e4fbe33c2c9056f0f482ceb684759d690903c15dddb3
|
Provenance
The following attestation bundles were made for drefs-0.1.0-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on scriptogre/drefs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
drefs-0.1.0-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
961a03fbe5d7172c4f7b5d4eceae5b0e9274155af20921cfcf70043f35094e7b - Sigstore transparency entry: 1317066049
- Sigstore integration time:
-
Permalink:
scriptogre/drefs@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scriptogre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91b1cfa46d190b1dfc62beb9865917e2c9e4e6a1 -
Trigger Event:
push
-
Statement type: