Skip to main content

アノテーションチェッカー

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

This version

1.1

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)

Uploaded Source

Built Distribution

chk_args-1.1-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

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