Generic type ReturnType and mypy checker plugin
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
return_type-0.1.1.tar.gz
(2.2 kB
view details)
File details
Details for the file return_type-0.1.1.tar.gz.
File metadata
- Download URL: return_type-0.1.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dc8cefddaa9850beabaae24b9535c2a7f67410c827d79b6d33a95b08bd48e11
|
|
| MD5 |
3eea00cd890b678a2fc30f4fcfcb0330
|
|
| BLAKE2b-256 |
3abe08f3ee7fd1495dca6052341b2efc58e62f39830a7669c0277c6c953f89bd
|