ReturnType
Generic type ReturnType and mypy checker plugin
Install
pip install return_type
add plugin to mypy.ini
[mypy]
plugins = return_type.mypy-plugin.py
Usage
import typing as t
from return_type import ReturnType
C = t.Callable[..., int]
RC = ReturnType[C]
assert RC = int
v1: RC = 1 # correct
v2: RC = 1. # error
Release files for return-type 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| return_type-0.1.1.tar.gz | 2.2 kB | Details |
Release files / return_type-0.1.1.tar.gz
| Download URL | return_type-0.1.1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1dc8cefddaa9850beabaae24b9535c2a7f67410c827d79b6d33a95b08bd48e11
|
|
BLAKE2b-256 checksum How to use checksums |
3abe08f3ee7fd1495dca6052341b2efc58e62f39830a7669c0277c6c953f89bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|