Update opt_logger
accept Logger
or a LoggerAdapter
. See /source/general/dec_feature/opt_logger
.
Added option opt_logger
to many decorators. See /source/general/dec_feature/opt_logger
.
Added Rules:
- RulePath
- RulePathExist
- RulePathNotExist
- RuleStrPathExist
- RuleStrPathNotExist
Added option opt_args_filter
to AcceptedTypes
, RuleCheckAll
, RuleCheckAny
, SubClass
, TypeCheck
See /source/general/dec_feature/opt_args_filter
.
Upgraded underling engine to use OrderedDict to ensure order of keys for python <= 3.6
Added SubClass, SubClassKw decorators.
Added opt_all_args
feature to AcceptedTypes
decorator. See /source/general/dec_feature/opt_all_args
Update AcceptedTypes decorator. Now passing enum types into constructor no longer require enum type to be passed in as iterable object.
Updated many decorator error message. Now they are a little more human readable.
Added decorator ArgsMinMax
Added Rules:
- RuleIterable
- RuleNotIterable
Added opt_return
feature to many decorators. See /source/general/dec_feature/opt_return
ArgsLen
decorator now allows zero length args.
@ArgsLen(0, 2)
def foo(*args, **kwargs): pass
Added Decorator ArgsLen.
Added Rules:
- RuleByteSigned
- RuleByteUnsigned
Bug fix for AcceptedTypes
Decorator when function has leading named args before positional args.
The following will now work.
@AcceptedTypes(float, str, int, [Color], int, bool)
def myfunc(arg1, arg2, *args, opt=True): pass
- Update fix for python DeprecationWarning:
Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated
Added Install documentation.
Added Development documentation.
Fix for Decorator AcceptedTypes
not working correctly with optional arguments.
Fix for version 2.1.0 setup not building correctly.
New Features
Added Decorators that provided a large range of options for validating function, class input and return values. Also added decorators that provide other functionality such as singleton pattern.