Skip to main content

CLI tool to propagate py.typed into third-party libraries.

Project description

typeforce

Typeforce is a CLI tool that enriches your Python environment with type annotations, empowering mypy.

In particular:

  • Generates py.typed for annotated packages.
  • Installs missed stub files and plugins.

py.typed

PEP-561 says the following:

Package maintainers who wish to support type checking of their code MUST add a marker file named py.typed to their package supporting typing.

In practice, many maintainers don't know about this marker. So there are tons of packages that do have type annotations but don't have py.typed.

Typeforce checks all installed third-party packages and adds py.typed into packages that have type annotations.

stubs and plugins

One of the breaking changes mypy 0.900 introduced is moving out all stubs and plugins for third-party packages out of mypy itself. Now, stub files for every such package should be installed manually.

Typeforce scans all installed third-party packages and installs all needed stub files and plugins if available.

Installation

python3 -m pip install --user typeforce

Usage

python3 -m typeforce --exe python3.9

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

typeforce-0.2.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

typeforce-0.2.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file typeforce-0.2.0.tar.gz.

File metadata

  • Download URL: typeforce-0.2.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for typeforce-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d6363b578bf923cc5e4fc36b8e8fe20e32b5889a598bdcb37733caa8bbe9c4dd
MD5 cd28ba3e6b4ff31a5d462b3333cff2a8
BLAKE2b-256 05c491b65cc9aec89d12dc91dfe48f5d9e46a1a6f9be0ebacb938749ea077d4f

See more details on using hashes here.

File details

Details for the file typeforce-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: typeforce-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for typeforce-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69e395958a086553078878f3cc9deda13921ddd6c725e62cd367d96aee80099a
MD5 8278e70edfad444b2520008d664d4c5c
BLAKE2b-256 7f630ebee12057dcad6e4dd555ffb46fa20b7e789c835f8a1a9f54ae4ad27daa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page