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