带有装饰器的python类型验证器
type-valid的Python项目详细描述
#python类型有效
[![通过python type valid build](https://travis-ci.org/edmhs/python-type-valid.svg?branch=master)(https://travis ci.org/edmhs/python类型有效)
[![Python类型有效代码覆盖率](https://codecov.io/gh/codecov/example python/branch/master/graph/badge.svg)(https://codecov.io/gh/edmhs/python type valid)
[![可维护性](https://api.codeculate.com/v1/badges/a99a88d28ad37a79dbf6/mainability)(https://codeculate.com/github/edmhs/python type validation有效)
python type validation decorator,验证输入和输出类型
返回名
有效
您好(1)
无效
无效
您好(1)
@类型有效
def user(name:str,age:int,salary:float,salar;str:
返回名+str(age)+str(年龄)+str str(年龄)+str str(salary)
>有效
user(name=“bob”,age=25,年龄=25,工资=1000.00,工资=1000.00);
“hello”,参数“name”的类型不是<;class“str”>;,接收的类型不是<;class“int”>;
~~~~
\todo:
*验证输入完成
*验证输出完成
*验证输入**kwargs?
*验证强制**Kwargs?
*多种类型?
[![通过python type valid build](https://travis-ci.org/edmhs/python-type-valid.svg?branch=master)(https://travis ci.org/edmhs/python类型有效)
[![Python类型有效代码覆盖率](https://codecov.io/gh/codecov/example python/branch/master/graph/badge.svg)(https://codecov.io/gh/edmhs/python type valid)
[![可维护性](https://api.codeculate.com/v1/badges/a99a88d28ad37a79dbf6/mainability)(https://codeculate.com/github/edmhs/python type validation有效)
python type validation decorator,验证输入和输出类型
返回名
有效
您好(1)
无效
无效
您好(1)
@类型有效
def user(name:str,age:int,salary:float,salar;str:
返回名+str(age)+str(年龄)+str str(年龄)+str str(salary)
>有效
user(name=“bob”,age=25,年龄=25,工资=1000.00,工资=1000.00);
“hello”,参数“name”的类型不是<;class“str”>;,接收的类型不是<;class“int”>;
~~~~
\todo:
*验证输入完成
*验证输出完成
*验证输入**kwargs?
*验证强制**Kwargs?
*多种类型?