drefs 0.1.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: drefs
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Programming Language :: Rust
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Topic :: Documentation
|
|
11
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Summary: A hyper-fast Python docstring cross-reference checker
|
|
14
|
+
Keywords: documentation,docstring,cross-reference,linter,mkdocs,sphinx
|
|
15
|
+
License-Expression: MIT
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
18
|
+
Project-URL: Changelog, https://github.com/scriptogre/drefs/blob/main/CHANGELOG.md
|
|
19
|
+
Project-URL: Repository, https://github.com/scriptogre/drefs
|
|
20
|
+
|
|
21
|
+
# drefs
|
|
22
|
+
|
|
23
|
+
[](https://github.com/scriptogre/drefs/actions/workflows/ci.yml)
|
|
24
|
+
[](https://pypi.org/project/drefs/)
|
|
25
|
+
[](https://pypi.org/project/drefs/)
|
|
26
|
+
[](LICENSE)
|
|
27
|
+
|
|
28
|
+
An extremely fast Python docstring cross-reference checker, written in Rust.
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<picture align="center">
|
|
32
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/benchmark-dark-v3.svg">
|
|
33
|
+
<source media="(prefers-color-scheme: light)" srcset="assets/benchmark-light-v3.svg">
|
|
34
|
+
<img alt="Shows a bar chart with benchmark results." src="assets/benchmark-light-v3.svg">
|
|
35
|
+
</picture>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<i>Validating cross-references in <a href="https://github.com/tinygrad/tinygrad">tinygrad</a> (697 Python files). <a href="BENCHMARKS.md">~460x faster.</a></i>
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uvx drefs .
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
src/my_pkg/models.py:12:5: DREF001 Unresolved reference `my_pkg.old_module.Foo`
|
|
50
|
+
src/my_pkg/views.py:45:9: DREF001 Unresolved reference `Nonexistent`
|
|
51
|
+
Found 2 errors.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
That's it.
|
|
55
|
+
|
|
56
|
+
## Supported syntax
|
|
57
|
+
|
|
58
|
+
- MkDocs: `[text][pkg.mod.Class]`, `[pkg.mod.Class][]`
|
|
59
|
+
- Sphinx: `` :class:`pkg.mod.Class` ``
|
|
60
|
+
- Rust-style: `[Symbol]`, `` [`Symbol`] ``, `[pkg.mod.Class]`
|
|
61
|
+
|
|
62
|
+
`[User]` resolves via the current file's imports. `[pkg.models.User]` resolves directly. Escape with `\[not a ref\]`.
|
|
63
|
+
|
|
64
|
+
drefs understands `__init__.py` re-exports, inheritance chains, and `self.x` attributes.
|
|
65
|
+
|
|
66
|
+
## Configuration
|
|
67
|
+
|
|
68
|
+
Optional. Add to `pyproject.toml`:
|
|
69
|
+
|
|
70
|
+
```toml
|
|
71
|
+
[tool.drefs]
|
|
72
|
+
src = ["src"] # auto-detected if omitted
|
|
73
|
+
style = "auto" # "mkdocs" | "sphinx" | "auto"
|
|
74
|
+
inventories = [ # validate against external symbols
|
|
75
|
+
"https://docs.python.org/3/objects.inv",
|
|
76
|
+
]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Editor support
|
|
80
|
+
|
|
81
|
+
### PyCharm / IntelliJ
|
|
82
|
+
|
|
83
|
+
- Ctrl+Click on each segment of a dotted path
|
|
84
|
+
- Syntax highlighting on cross-references
|
|
85
|
+
- Red squiggles on broken references
|
|
86
|
+
|
|
87
|
+
Install from `editors/pycharm/build/distributions/drefs-pycharm-*.zip` via Settings > Plugins > Install from Disk.
|
|
88
|
+
|
|
89
|
+
## Contributing
|
|
90
|
+
|
|
91
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT
|
|
96
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
drefs-0.1.0.data/scripts/drefs.exe,sha256=4klCDvJ1jyuIy3TuatONsCGkYSwJFBqHB6Bw4CjWLeg,5789696
|
|
2
|
+
drefs-0.1.0.dist-info/METADATA,sha256=Jfz7ynQ0LYz5_l146z-RWvGAYw9f4E2PYo15mCUsQTA,3203
|
|
3
|
+
drefs-0.1.0.dist-info/WHEEL,sha256=0cg7uMdVM1SNK0ih4zFWnV0wsxqvcArlTmRGOaRhEnw,94
|
|
4
|
+
drefs-0.1.0.dist-info/licenses/LICENSE,sha256=CUhQ2eFTEpeh1W2Uwi7WgJdv0kFzWE7cdUk8lFAKLag,1096
|
|
5
|
+
drefs-0.1.0.dist-info/sboms/drefs.cyclonedx.json,sha256=WkHVFKduLHn-h0lKt4EiRUh3fzbZp6MydgeaJquotNs,98203
|
|
6
|
+
drefs-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 drefs contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|