wily\decorators.py
-- -- --- --- --- --- --- --- ------- ------- ------- | """
-- -- --- --- --- --- --- --- ------- ------- ------- | A module including decorators for wily.
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- | This API is not intended to be public and should not be consumed directly.
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- | """
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- | from wily import __version__
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- -- --- --- --- --- --- --- ------- ------- ------- |
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | def add_version(f):
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | """
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | Add the version of wily to the help heading.
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 |
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | :param f: function to decorate
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | :return: decorated function
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | """
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | doc = f.__doc__
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | f.__doc__ = "Version: " + __version__ + "\n\n" + doc
-- 01 001 006 003 006 007 009 0025.27 0012.63 0000.50 | return f