Skip to content

Latest commit

 

History

History
117 lines (104 loc) · 3.26 KB

File metadata and controls

117 lines (104 loc) · 3.26 KB

python-stubs

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.

Usage

  1. Clone the repository:
    git clone https://github.com/hamdanal/python-stubs /path/to/python-stubs
  2. In VSCode's settings.json file, add the stubs path to the appropriate setting:
    1. If using Pylance:
      "python.analysis.extraPaths": ["/path/to/python-stubs/stubs"]
    2. If using ty:
      "ty.configuration": {
        "environment": {
          "extra-paths": ["/path/to/python-stubs/stubs"]
        }
      }

Contributing

Contributions of any kind are welcome. Please open an issue or a send pull request.

To set up a development environment:

  1. Install uv: https://docs.astral.sh/uv/getting-started/installation/
  2. Install the project dependencies: uv sync --frozen
  3. Run uv run python run.py --help for more.

License

This project is licensed under the MIT License.

List of available stubs

Project Import name Links Status Tested
django-netfields netfields PyPI, GitHub Complete No
django-postgres-extra psqlextra PyPI, GitHub Incomplete No
pandapower pandapower PyPI, GitHub Incomplete Yes
pyogrio pyogrio PyPI, GitHub Complete Yes

Upstreamed stubs

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