# 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()


import itertools
import collections
from functools import partial
from sigtools import _util
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.



try:
    zip_longest = itertools.izip_longest
except AttributeError: # pragma: no cover
    zip_longest = itertools.zip_longest


class Signature(_util.funcsigs.Signature):
    __slots__ = _util.funcsigs.Signature.__slots__ + ('sources',)

    def __init__(self, *args, **kwargs):
        self.sources = kwargs.pop('sources', {})
        super(Signature, self).__init__(*args, **kwargs)

    @classmethod
    def upgrade(cls, inst, sources):
        if isinstance(inst, cls):
            return inst
        return cls(
            inst.parameters.values(),

# 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/_signatures.py
import itertools
import collections
from functools import partial
from sigtools import _util

#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.



try:
    zip_longest = itertools.izip_longest
except AttributeError: # pragma: no cover
    zip_longest = itertools.zip_longest


class Signature(_util.funcsigs.Signature):
    __slots__ = _util.funcsigs.Signature.__slots__ + ('sources',)

    def __init__(self, *args, **kwargs):
        self.sources = kwargs.pop('sources', {})
        super(Signature, self).__init__(*args, **kwargs)

    @classmethod
    def upgrade(cls, inst, sources):
        if isinstance(inst, cls):
            return inst
        return cls(
            inst.parameters.values(),

            return_annotation=inst.return_annotation,