アノテーションチェッカー
Project description
アノテーションチェッカー
概要
Pythonのアノテーションを参考に関数の引数チェックを行います。
PEP484等に準じ書いてるつもりです。
問題点
Note that this PEP still explicitly does NOT prevent other uses of annotations, nor does it require (or forbid) any particular processing of annotations, even when they conform to this specification. 引用元
現在禁止してるので警告に変更するべきかもしれない
使用方法
from chk_args import chk_args
@chk_args
def example(arg_1:int):
return arg_1
example(5)
#result->5
example("a")
#result->TypeError("The type of argument (arg_1) is int.")
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
chk_args-1.1.tar.gz
(2.5 kB
view hashes)
Built Distribution
chk_args-1.1-py3-none-any.whl
(2.5 kB
view hashes)