# Path: sigtools/wrappers.py
# def wrappers(obj):
#     """For introspection purposes, returns an iterable that yields each
#     wrapping function of obj(as done through `wrapper_decorator`, outermost
#     wrapper first.
# 
#     Continuing from the `wrapper_decorator` example::
# 
#         >>> list(wrappers.wrappers(as_list))
#         [<<function print_call at 0x7f28d721a950> with signature print_call(func, *args,
#          _show_return=True, **kwargs)>]
# 
#     """
#     while True:
#         try:
#             wrappers = obj._sigtools__wrappers
#         except AttributeError:
#             return
#         for wrapper in wrappers:
#             yield wrapper
#         obj = obj.__wrapped__
# 
# Path: sigtools/support.py
# def read_sig(sig_str, ret=_util.UNSET, *,
#              use_modifiers_annotate=False,
#              use_modifiers_posoargs=sys.version_info < (3, 8),
#              use_modifiers_kwoargs=False,
#     ):
# def func_code(names, return_annotation, annotations, posoarg_n,
#               kwoarg_n, params, use_modifiers_annotate,
#               pre='', name='func',
#     ):
# def make_func(source, locals=None, name='func', future_features=()):
# def f(sig_str, ret=_util.UNSET, *, pre='', locals=None, name='func', future_features=(), **kwargs):
# def s(*args, **kwargs):
# def func_from_sig(sig):
# def make_up_callsigs(sig, extra=2):
# def bind_callsig(sig, args, kwargs):
# def sort_callsigs(sig, callsigs):
# def test_func_sig_coherent(func, check_return=True, check_invalid=True):
# DEBUG_STDLIB=False
# 
# Path: sigtools/signatures.py

# 
# Path: sigtools/tests/util.py
# def conv_first_posarg(sig):
# def func_to_name(func):
# def transform_exp_sources(d, subject=None):
# def transform_real_sources(d):
#     def assertSigsEqual(self, found, expected, *args, **kwargs):
#     def assertSourcesEqual(self, found, expected, func=None, depth_order=False):
#     def downgrade_sig(self, sig):
# class SignatureTests(unittest.TestCase):


from sigtools import wrappers, support, signatures
from sigtools.tests.util import tup, Fixtures
    @wrappers.decorator
    def _deco_pos(func, p, q, *args, **kwargs):
        return p, func(q, *args, **kwargs)

    @tup('p, q, ma, mb', (1, 2, 3, 4), {}, (1, (2, 3, 4)),
         {0: ['ma', 'mb'], '_deco_pos': 'pq',
          '+depths': ['_deco_pos', 'masked']},
         [_deco_pos])
    @_deco_pos
    def masked(mq, ma, mb):
        return mq, ma, mb

    @_deco_all
    @_deco_pos
    def _chain(ca, cb, cc):
        return ca, cb, cc

    chain = (
        _chain, 'a, b, p, q, cb, cc',
        (1, 2, 3, 4, 5, 6), {}, (1, 2, (3, (4, 5, 6))),
        {0: ['cb', 'cc'], '_deco_all': 'ab', '_deco_pos': 'pq',
         '+depths': ['_deco_all', '_deco_pos', '_chain']},
        [_deco_all, _deco_pos])

    def _deco_classic(func):
        def wrapper(d, e, *args, **kwargs): return d, e, func(*args, **kwargs)
        wrapper.__name__ = '_deco_classic'
        wrapper.__wrapped__ = func
        return wrapper


# Path: sigtools/wrappers.py
# def wrappers(obj):
#     """For introspection purposes, returns an iterable that yields each
#     wrapping function of obj(as done through `wrapper_decorator`, outermost
#     wrapper first.
# 
#     Continuing from the `wrapper_decorator` example::
# 
#         >>> list(wrappers.wrappers(as_list))
#         [<<function print_call at 0x7f28d721a950> with signature print_call(func, *args,
#          _show_return=True, **kwargs)>]
# 
#     """
#     while True:
#         try:
#             wrappers = obj._sigtools__wrappers
#         except AttributeError:
#             return
#         for wrapper in wrappers:
#             yield wrapper
#         obj = obj.__wrapped__
# 
# Path: sigtools/support.py
# def read_sig(sig_str, ret=_util.UNSET, *,
#              use_modifiers_annotate=False,
#              use_modifiers_posoargs=sys.version_info < (3, 8),
#              use_modifiers_kwoargs=False,
#     ):
# def func_code(names, return_annotation, annotations, posoarg_n,
#               kwoarg_n, params, use_modifiers_annotate,
#               pre='', name='func',
#     ):
# def make_func(source, locals=None, name='func', future_features=()):
# def f(sig_str, ret=_util.UNSET, *, pre='', locals=None, name='func', future_features=(), **kwargs):
# def s(*args, **kwargs):
# def func_from_sig(sig):
# def make_up_callsigs(sig, extra=2):
# def bind_callsig(sig, args, kwargs):
# def sort_callsigs(sig, callsigs):
# def test_func_sig_coherent(func, check_return=True, check_invalid=True):
# DEBUG_STDLIB=False
# 
# Path: sigtools/signatures.py

# 
# Path: sigtools/tests/util.py
# def conv_first_posarg(sig):
# def func_to_name(func):
# def transform_exp_sources(d, subject=None):
# def transform_real_sources(d):
#     def assertSigsEqual(self, found, expected, *args, **kwargs):
#     def assertSourcesEqual(self, found, expected, func=None, depth_order=False):
#     def downgrade_sig(self, sig):
# class SignatureTests(unittest.TestCase):


# Path: sigtools/tests/test_decorator.py
from sigtools import wrappers, support, signatures
from sigtools.tests.util import tup, Fixtures

    @wrappers.decorator
    def _deco_pos(func, p, q, *args, **kwargs):
        return p, func(q, *args, **kwargs)

    @tup('p, q, ma, mb', (1, 2, 3, 4), {}, (1, (2, 3, 4)),
         {0: ['ma', 'mb'], '_deco_pos': 'pq',
          '+depths': ['_deco_pos', 'masked']},
         [_deco_pos])
    @_deco_pos
    def masked(mq, ma, mb):
        return mq, ma, mb

    @_deco_all
    @_deco_pos
    def _chain(ca, cb, cc):
        return ca, cb, cc

    chain = (
        _chain, 'a, b, p, q, cb, cc',
        (1, 2, 3, 4, 5, 6), {}, (1, 2, (3, (4, 5, 6))),
        {0: ['cb', 'cc'], '_deco_all': 'ab', '_deco_pos': 'pq',
         '+depths': ['_deco_all', '_deco_pos', '_chain']},
        [_deco_all, _deco_pos])

    def _deco_classic(func):
        def wrapper(d, e, *args, **kwargs): return d, e, func(*args, **kwargs)
        wrapper.__name__ = '_deco_classic'
        wrapper.__wrapped__ = func
        return wrapper


    @tup('a, b, d, e, j, k, l',