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.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

typeforce-0.2.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for typeforce-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d12ff8788412320f89a4ed814184056b1e0a2cacff57d501da6b188a5ccb2d77
MD5 1951acd7cb9873f1c0400181ca9c6aea
BLAKE2b-256 7b76a4114a02e09507049edb9d37834bfb5d2821a903890747cfc0f10aafe8a0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for typeforce-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c419e83d663fa556e9c7f15ed9d4ab2e9bfe357d08cde98a3a8f289aa71ef06a
MD5 09f374a1d09e6fc1f75c549a28e1119e
BLAKE2b-256 d548d3cafa7242c3aafee1a363f35c51f4460c6a190f9ff01d8449e2700e2703

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