This repository provides stubs for some python packages that do not offer proper type hints
and have no stubs available. The main goal is to provide helpers for VSCode's Pylance language
server to offer better autocompletion. Another goal is to improve the performance of VSCode's
python extension where it suffers from slow downs with some packages (For example, installing
pandapower
without the stubs, python analysis in VSCode takes up to 7 seconds to complete on
every change).
- Clone the repository:
git clone https://github.com/hamdanal/python-stubs /path/to/python-stubs
- Add the stubs to
"extraPaths"
in your VSCode'ssettings.json
:"python.analysis.extraPaths": ["/path/to/python-stubs/stubs"]
Contributions of any kind are welcome. Please open an issue or a send pull request.
To set up a development environment:
- Create a virtual environment:
python -m .venv venv
- Activate the virtual environment:
- Unix:
. .venv/bin/activate
- Windows:
.venv\Scripts\activate
- Unix:
- Install the dependencies:
python -m pip install -r requirements.txt
Run python run.py --help
for more.
This project is licensed under the MIT License.
Project | Import name | Links | Status | Type-checked | Tested |
---|---|---|---|---|---|
django-netfields | netfields |
PyPI, GitHub | Complete | Yes | No |
django-postgres-extra | psqlextra |
PyPI, GitHub | Incomplete | Yes | No |
pandapower | pandapower |
PyPI, GitHub | Incomplete | Yes | No |
geopandas | geopandas |
PyPI, GitHub | Complete | Yes | Yes |
These stubs were included here in the past and have been moved to typeshed or to the their libraries.
Project | Moved to | Installation |
---|---|---|
seaborn | typeshed | pip install types-seaborn |
shapely | typeshed | pip install types-shapely |