Skip to content

viewthespace/mypy-stubs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mypy-stubs

Mypy stubs for a variety of libraries. Provided as a set of PEP 561 compatible packages.

Usage

Simply add this package as a dependency.

Development guidelines

  • Be sure to bump the version, otherwise dependents may not actually re-install
  • Be sure to add new stub packages (dirs in ./src) to the packages list in pyproject.toml

Using in a project for development

Poetry has some bad ergonomics (read: bugs) around this. Workarounds are noted.

  1. In the other project, update the dependency to e.g. {path="../mypy-stubs", develop = true}
  2. Due to bugs, it may be necessary to uninstall the existing package with e.g. poetry run pip uninstall typeshed_vts
  3. Due to bugs, it may be necessary to remove all the *-stubs entries in packages in this project’s pyproject.toml
  4. In the other project, update packages e.g. poetry update typeshed_vts

Special considerations

Some types have additional constructs added to them that are instead part of the typing_vts package.

Airflow

  • typing_vts.Context is an Airflow Context

Shapely

To avoid errors, the Shapely types use NewType for X, Y, and Z parameters. However, these don’t actually exist in Shapely. Instead, import them like:

from typeshed_vts.shapely import X, Y, Z

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages