No project description provided
Project description
PaddlePaddle Stubs WIP
A stubs package as described in PEP 561 for PaddlePaddle.
目前仅针对 Pyright 进行了编写和测试,并没有针对 Mypy 进行编写和测试,因此目前可能仅仅与 VS Code 的 Pylance 扩展一起工作良好~
Note
本 repo 非运行时库,因此本 repo 中所有示例和单测可能在运行时并不能正常运行,仅仅是为了更加全面和方便对类型进行检查而已。
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
起步阶段,最低支持 Python3.7,目前基于 PaddlePaddle 2.3.1 开发,第一个可用版本应当是 2.3.1 版本或者更晚的 2.4 版本~
Roadmap
See paddlepaddle-stubs 2.3.1 Roadmap
2.3.1 alpha
Note
此时本 repo 可 public,并发布到 PyPI
- 通过 basic mode 的类型检查
- 完善全部 P1 级别的类型信息(strict 下工作良好)
2.3.1 beta
- 完善全部 P2 级别的类型信息(strict 下工作良好)
- 官网示例高层 API 搭建 MNIST 示例代码在 strict 模式下工作良好
Future
下一步工作首先保证全部类型 basic 下工作良好
之后应该是一边升级到新版本(2.4.0),一边继续完善 P3、P4、P5 级别的类型信息(strict 下工作良好)
要添加的还有很多,各个 API 类型信息需要仔细填写(修改自动生成的 Any,添加返回值类型),有兴趣的小伙伴可以一起来参与呀~
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 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 paddlepaddle-stubs-2.3.1.dev3.tar.gz.
File metadata
- Download URL: paddlepaddle-stubs-2.3.1.dev3.tar.gz
- Upload date:
- Size: 175.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0b3 CPython/3.10.6 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd07ec9fc754f9b2fd8cf2f28eacd3bbe65dcc4686fbe74ea263bf8bc234902b
|
|
| MD5 |
b62a2dcee568c6e54a95c105d0eb72f9
|
|
| BLAKE2b-256 |
a5f3b9a715a8366c736401d7906790f9f8a7464ec14740569216f7d1357023f4
|
File details
Details for the file paddlepaddle_stubs-2.3.1.dev3-py3-none-any.whl.
File metadata
- Download URL: paddlepaddle_stubs-2.3.1.dev3-py3-none-any.whl
- Upload date:
- Size: 386.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0b3 CPython/3.10.6 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3e3ff552ae83bd70e9e5ecb7a260d0bf2305b99f18176d1795976a50ba86280
|
|
| MD5 |
4bd72903ef7620e6cf2114a167ef7a34
|
|
| BLAKE2b-256 |
a30d8f550a1739af8e2f0c53de51254ec53e045c01c89bc7f8f6e00e8561049f
|