This release is a pre-release and may not be stable for production use.
PaddlePaddle Stubs WIP
A stubs package as described in PEP 561 for PaddlePaddle.
目前仅针对 Pyright 进行了编写和测试,尚未支持 Mypy(Mypy 相对于 Pyright 太难用了,缺失功能太多),因此目前可能仅仅与 VS Code 的 Pylance 扩展一起工作良好~
Usage
pip install paddlepaddle-stubs --pre
此时再打开编辑器,查看编辑器的类型提示~~~
VS Code 推荐配置:
{
"python.languageServer": "Pylance",
// 现在有一些类型在 strict mode 工作的并不是很好,推荐先使用 basic mode
"python.analysis.typeCheckingMode": "basic",
"python.analysis.inlayHints.functionReturnTypes": true,
"python.analysis.inlayHints.variableTypes": true,
}
Status
起步阶段,最低支持 Python 3.8,目前基于 PaddlePaddle 2.3.1 开发,第一个可用版本应当是 2.3.1 版本或者更晚的 2.4 版本~
Roadmap
See paddlepaddle-stubs 2.3.1 Roadmap
2.4.0 alpha
Note
此时本 repo 可 public,并发布到 PyPI
- 通过 basic mode 的类型检查
- 完善全部 P1 级别的类型信息(strict 下工作良好)
2.4.0 beta
- 完善全部 P2 级别的类型信息(strict 下工作良好)
- 官网示例高层 API 搭建 MNIST 示例代码在 strict 模式下工作良好
Future
之后应该是一边升级到新版本(2.4.0),一边继续完善 P3、P4、P5 级别的类型信息(strict 下工作良好)
要添加的还有很多,各个 API 类型信息需要仔细填写(修改自动生成的 Any,添加返回值类型),有兴趣的小伙伴可以一起来参与呀~
Metadata
Release files for paddlepaddle-stubs 3.0.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| paddlepaddle_stubs-3.0.0a1.tar.gz | 151.7 kB | Without provenance | Details for paddlepaddle_stubs-3.0.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paddlepaddle_stubs-3.0.0a1-py3-none-any.whl | Python 3 | none | any | Details for paddlepaddle_stubs-3.0.0a1-py3-none-any.whl |
Total release size: 497.9 kB
Release files / paddlepaddle_stubs-3.0.0a1.tar.gz
| Download URL | paddlepaddle_stubs-3.0.0a1.tar.gz |
|---|---|
| Size | 151.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa0582c58585c0f5312cde1a639851171a9cbc82f2568a26af8f60da37b91304
|
|
BLAKE2b-256 checksum How to use checksums |
7771976fae6e2959b182d68d6904ae47709c517220fe7db91703e92c46850bb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / paddlepaddle_stubs-3.0.0a1-py3-none-any.whl
| Download URL | paddlepaddle_stubs-3.0.0a1-py3-none-any.whl |
|---|---|
| Size | 346.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cbd5728da68baf3e92340bc8a8c2b2b43c88b2553f471f2f24c4651abbe607d
|
|
BLAKE2b-256 checksum How to use checksums |
34bad79ca4489d9b59fb8cf50af8504b549c5cd08ec7538e95451379a245977f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for paddlepaddle-stubs 3.0.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.