Skip to main content

Type stubs for compose.

Versioning

This library’s version numbers follow the SemVer 2.0.0 specification.

Installation

pip install compose-stubs

Usage

Like any other typing stub package, once installed it should “just work”. You might need to restart your type checker.

Limitations

  1. MyPy fails to match the return type of an async function to the argument type of the next function in the type hints of acompose and sacompose, leading to false errors about types not matching. (Pyright and Pyre don’t have this problem.)

  2. Due to limitations in Python type hints, these typing stubs only cover at most 16 arguments in a single call to compose, acompose, or sacompose. This limit could be higher, but the higher the limit, the slower the type-checking. A simple workaround is to just use multiple compose calls to build up compositions bigger than 16 functions.

  3. Due to limitations in Python type hints, there is an edge case in the type hints for sacompose if the return type of one function in a composition is awaitable and the next function accepts that awaitable (the most likely way for this to happen is if it accepts Any), then sacompose actually returns an async callable, but the type inference will think that it returns a sync callable.

  4. Requires Python 3.10 and above (compose itself remains supported on much older versions, but the type hints need typing.ParamSpec).

Metadata

Release files for compose-stubs 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compose-stubs 1.0.0
File Size Uploaded
compose-stubs-1.0.0.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for compose-stubs 1.0.0
File Interpreter ABI Platform
compose_stubs-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / compose-stubs-1.0.0.tar.gz

Download URL compose-stubs-1.0.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aff4ac0f5f393a6ccb297c1cb375ee00bd6b26b5836ccae64d840d2952110ea3
BLAKE2b-256 checksum
How to use checksums
8c4950608111b98f0430af99294bef2fc9ddbb9c06e50363d803eeef3b5ae285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / compose_stubs-1.0.0-py3-none-any.whl

Download URL compose_stubs-1.0.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
591c60b0d806e4bdce241854e67deb8c58cdea9caae018ef21747bc487822308
BLAKE2b-256 checksum
How to use checksums
d38ba8311e0b948be3b237af0860aa93db92f180a8e60edff16a6542db65fb09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page