This repository provides stubs for some python packages that do not offer proper type hints and have no stubs available. It improves language service experience in editors like VSCode by providing better autocompletion and sometimes better performance.
- Clone the repository:
git clone https://github.com/hamdanal/python-stubs /path/to/python-stubs
- In VSCode's
settings.jsonfile, add the stubs path to the appropriate setting:- If using Pylance:
"python.analysis.extraPaths": ["/path/to/python-stubs/stubs"]
- If using ty:
"ty.configuration": { "environment": { "extra-paths": ["/path/to/python-stubs/stubs"] } }
- If using Pylance:
Contributions of any kind are welcome. Please open an issue or a send pull request.
To set up a development environment:
- Install
uv: https://docs.astral.sh/uv/getting-started/installation/ - Install the project dependencies:
uv sync --frozen - Run
uv run python run.py --helpfor 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 | 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 |
| geopandas | typeshed | pip install types-geopandas |