# Path: sigtools/signatures.py

# 
# Path: sigtools/support.py
# def s(*args, **kwargs):
#     """Creates a signature from the given string representation of one.
# 
#     .. warning::
#         The contents of the arguments are eventually passed to `exec`.
#         Do not use with untrusted input.
# 
#     ::
# 
#         >>> from sigtools.support import s
#         >>> sig = s('a, b=2, *args, c:"annotation", **kwargs')
#         >>> sig
#         <inspect.Signature object at 0x7f15e6055550>
#         >>> print(sig)
#         (a, b=2, *args, c:'annotation', **kwargs)
#     """
#     return specifiers.signature(f(*args, **kwargs))
# 
# 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/_util.py
# def get_funcsigs():
#     def __repr__(self):
# def noop(func):
# def qualname(obj):
#     def __init__(self, *args, **kwargs):
#             def cg(func, **kwargs):
#     def __get__(self, instance, owner):
# def safe_get(obj, instance, owner):
# def iter_call(obj):
# def get_introspectable(obj, forged=True, af_hint=True, partial=True):
# def get_ast(func):
# class _Unset(object):
# class OverrideableDataDesc(object):
# UNSET = _Unset()


from sigtools.signatures import merge, IncompatibleSignatures
from sigtools.support import s
from sigtools.tests.util import Fixtures
from sigtools._util import OrderedDict as Od, funcsigs
        sig = merge(*sigs)
        exp_sig = s(result)
        exp_sources['+depths'] = dict(
            ('_' + str(i + 1), 0) for i in range(len(signatures)))

        self.assertSigsEqual(sig, exp_sig)
        self.assertSourcesEqual(sig.sources, exp_sources)

        sigs = [
            funcsigs.Signature(sig.parameters.values(),
                               return_annotation=sig.return_annotation)
            for sig in sigs]
        self.assertSigsEqual(merge(*sigs), exp_sig)

    posarg_default_erase = '', {}, '', '<a>=1'
    posarg_stars = '<a>', {2: 'a'}, '*args', '<a>'

    posarg_convert = '<a>', {1: 'a'}, '<a>', 'b'
    posarg_convert_left = '<b>', {2: 'b'}, 'a', '<b>'

    pokarg_default_erase = '', {}, '', 'a=1'

    pokarg_star_convert_pos = '<a>', {2: 'a'}, '*args', 'a'
    pokarg_star_convert_kwo = '*, a', {2: 'a'}, '**kwargs', 'a'
    pokarg_star_keep = 'a', {2: 'a'}, '*args, **kwargs', 'a'

    pokarg_rename = '<a>', {1: 'a'}, 'a', 'b'
    pokarg_rename_second = '<a>, <b>', {1: 'ab', 2: 'a'}, 'a, b', 'a, c'

    pokarg_found_kwo = '*, a', Od([(1, 'a'), (2, 'a')]), '*, a', 'a'

# Path: sigtools/signatures.py

# 
# Path: sigtools/support.py
# def s(*args, **kwargs):
#     """Creates a signature from the given string representation of one.
# 
#     .. warning::
#         The contents of the arguments are eventually passed to `exec`.
#         Do not use with untrusted input.
# 
#     ::
# 
#         >>> from sigtools.support import s
#         >>> sig = s('a, b=2, *args, c:"annotation", **kwargs')
#         >>> sig
#         <inspect.Signature object at 0x7f15e6055550>
#         >>> print(sig)
#         (a, b=2, *args, c:'annotation', **kwargs)
#     """
#     return specifiers.signature(f(*args, **kwargs))
# 
# 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/_util.py
# def get_funcsigs():
#     def __repr__(self):
# def noop(func):
# def qualname(obj):
#     def __init__(self, *args, **kwargs):
#             def cg(func, **kwargs):
#     def __get__(self, instance, owner):
# def safe_get(obj, instance, owner):
# def iter_call(obj):
# def get_introspectable(obj, forged=True, af_hint=True, partial=True):
# def get_ast(func):
# class _Unset(object):
# class OverrideableDataDesc(object):
# UNSET = _Unset()


# Path: sigtools/tests/test_merge.py
from sigtools.signatures import merge, IncompatibleSignatures
from sigtools.support import s
from sigtools.tests.util import Fixtures
from sigtools._util import OrderedDict as Od, funcsigs

        sig = merge(*sigs)
        exp_sig = s(result)
        exp_sources['+depths'] = dict(
            ('_' + str(i + 1), 0) for i in range(len(signatures)))

        self.assertSigsEqual(sig, exp_sig)
        self.assertSourcesEqual(sig.sources, exp_sources)

        sigs = [
            funcsigs.Signature(sig.parameters.values(),
                               return_annotation=sig.return_annotation)
            for sig in sigs]
        self.assertSigsEqual(merge(*sigs), exp_sig)

    posarg_default_erase = '', {}, '', '<a>=1'
    posarg_stars = '<a>', {2: 'a'}, '*args', '<a>'

    posarg_convert = '<a>', {1: 'a'}, '<a>', 'b'
    posarg_convert_left = '<b>', {2: 'b'}, 'a', '<b>'

    pokarg_default_erase = '', {}, '', 'a=1'

    pokarg_star_convert_pos = '<a>', {2: 'a'}, '*args', 'a'
    pokarg_star_convert_kwo = '*, a', {2: 'a'}, '**kwargs', 'a'
    pokarg_star_keep = 'a', {2: 'a'}, '*args, **kwargs', 'a'

    pokarg_rename = '<a>', {1: 'a'}, 'a', 'b'
    pokarg_rename_second = '<a>, <b>', {1: 'ab', 2: 'a'}, 'a, b', 'a, c'

    pokarg_found_kwo = '*, a', Od([(1, 'a'), (2, 'a')]), '*, a', 'a'

    pokarg_found_kwo_r = '*, a', Od([(2, 'a'), (1, 'a')]), 'a', '*, a'