formart thrift file
Project description
thrift-fmt
thrift formatter
NOTE
等不及有空实现 https://github.com/alingse/thrift-parser 了,
打算先用 ptsd https://github.com/wickman/ptsd 来做一版
实在是看到公司一些文件乱七八糟的
TODO
- 单文件解析
- 定义格式 空格/换行/注释
- 支持 include?
- 封装成 python package
- struct 依赖排序(生成 python 代码会有依赖问题)
- 补充 optional/required
- 校正类型
- 兼容注释
python simple.py tutorial/tutorial.thrift
ptsd 不足
- comment 丢失
- default 值丢失
- optional required 丢失
- extends 后面的是一个
- 非逗号 + 2 space tab 风格
LICENSE
tutorial 目录从 https://github.com/apache/thrift/blob/master/tutorial/ 中 copy 过来
是 Apache 证书的
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
thrift-fmt-0.1.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for thrift_fmt-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff2e8206f2f98ff7a95f47599b4804155064afd805a10625830e3409653eb7f8 |
|
MD5 | 4baa5b3b3319f8351ee405319565cd23 |
|
BLAKE2b-256 | da9abca2706d148c9db5db9bbf75489f10e24056306b4b4047d265e5dde3d76a |