https://github.com/typesplainer/typesplainer
A Python type explainer!
https://github.com/typesplainer/typesplainer
Last synced: 3 months ago
JSON representation
A Python type explainer!
- Host: GitHub
- URL: https://github.com/typesplainer/typesplainer
- Owner: typesplainer
- License: mit
- Created: 2022-03-13T09:03:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-19T18:16:00.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T22:56:46.720Z (8 months ago)
- Language: Python
- Homepage: https://pypi.org/project/typesplainer
- Size: 57.6 KB
- Stars: 83
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
typesplainer
A Python typehint explainer!Available [as a cli](https://pypi.org/project/typesplainer), [as a website](https://wasimaster.xyz/typesplainer/), [as a vscode extension](https://marketplace.visualstudio.com/items?itemName=WasiMaster.typesplainer), [as a vim extension](https://github.com/typesplainer/typesplainer-vim)
[](https://pypi.org/project/typesplainer) [](https://wasimaster.xyz/typesplainer/) [](https://marketplace.visualstudio.com/items?itemName=WasiMaster.typesplainer) [](https://github.com/typesplainer/typesplainer-vim)
## Usage
First, install the package with `pip install typesplainer`
Then like any other tool such a `black`, `isort`. run typesplainer on your desired files or directory. It will automatically find all types and then explain them for you. e.g.
```sh
python -m typesplainer my_file.py
python -m typesplainer my_directory
```### Features
- Very performant! Takes 1.7 seconds (YMMV) to explain the entire [python rich library source code](https://github.com/Textualize/rich) consisting of around 50,000 lines!
- Colorized output. Output with colors is going to make sure your eyes feel refreshed.
- Intelligent explanation. Takes pluralization, pronoun usage, article usage, correct grammar into account.
- Best in class parser. It does not rely on some substandard AI based description generator, instead it parses the file using [mypy](https://github.com/python/mypy)'s custom parser and shows the most accurate description## Contribute
Contributions are appreciated. See the TODO.md file or open issues