# Path: sigtools/specifiers.py
# class _AsForged(object):
# class _ForgerWrapper(object):
#     def __init__(self):
#     def __get__(self, instance, owner):
# def set_signature_forger(obj, forger, emulate=None):
# def _transform(obj, meta):
#     def __init__(self, obj, forger):
#     def _sigtools__forger(self, obj):
#     def __call__(self, *args, **kwargs):
#     def __get__(self, instance, owner):
# def forger_function(func):
#     def _apply_forger(emulate=None, *args, **kwargs):
#         def _applier(obj):
# def forwards(wrapper, wrapped, *args, **kwargs):
# def forwards_to_function(obj, *args, **kwargs):
# def forwards_to_method(obj, wrapped_name, *args, **kwargs):
# def _get_origin_class(obj, cls):
# def forwards_to_super(obj, cls=None, *args, **kwargs):
# def apply_forwards_to_super(num_args=0, named_args=(), *member_names,
#                             **kwargs):
# def _apply_forwards_to_super(member_names, m_args, m_kwargs, cls):
# 
# 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 sphinx.ext import autodoc
from sigtools import specifiers, _util
`sphinx.ext.autodoc` can only automatically discover the signatures of basic
callables. This extension makes it use `sigtools.specifiers.signature` on the
callable instead.

Enable it by appending ``'sigtools.sphinxext'`` to the ``extensions`` list
in your Sphinx ``conf.py``

"""




class _cls(object):
    def method(self):
        raise NotImplementedError
instancemethod = type(_cls().method)
del _cls


def process_signature(app, what, name, obj, options,
                      sig, return_annotation):
    try:
        parent, obj = fetch_dotted_name(name)
    except AttributeError:
        return sig, return_annotation
    if isinstance(obj, instancemethod): # python 2 unbound methods
        obj = obj.__func__
    if isinstance(parent, type) and callable(obj):
        obj = _util.safe_get(obj, object(), type(parent))
    try:

# Path: sigtools/specifiers.py
# class _AsForged(object):
# class _ForgerWrapper(object):
#     def __init__(self):
#     def __get__(self, instance, owner):
# def set_signature_forger(obj, forger, emulate=None):
# def _transform(obj, meta):
#     def __init__(self, obj, forger):
#     def _sigtools__forger(self, obj):
#     def __call__(self, *args, **kwargs):
#     def __get__(self, instance, owner):
# def forger_function(func):
#     def _apply_forger(emulate=None, *args, **kwargs):
#         def _applier(obj):
# def forwards(wrapper, wrapped, *args, **kwargs):
# def forwards_to_function(obj, *args, **kwargs):
# def forwards_to_method(obj, wrapped_name, *args, **kwargs):
# def _get_origin_class(obj, cls):
# def forwards_to_super(obj, cls=None, *args, **kwargs):
# def apply_forwards_to_super(num_args=0, named_args=(), *member_names,
#                             **kwargs):
# def _apply_forwards_to_super(member_names, m_args, m_kwargs, cls):
# 
# 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/sphinxext.py
from sphinx.ext import autodoc
from sigtools import specifiers, _util

`sphinx.ext.autodoc` can only automatically discover the signatures of basic
callables. This extension makes it use `sigtools.specifiers.signature` on the
callable instead.

Enable it by appending ``'sigtools.sphinxext'`` to the ``extensions`` list
in your Sphinx ``conf.py``

"""




class _cls(object):
    def method(self):
        raise NotImplementedError
instancemethod = type(_cls().method)
del _cls


def process_signature(app, what, name, obj, options,
                      sig, return_annotation):
    try:
        parent, obj = fetch_dotted_name(name)
    except AttributeError:
        return sig, return_annotation
    if isinstance(obj, instancemethod): # python 2 unbound methods
        obj = obj.__func__
    if isinstance(parent, type) and callable(obj):
        obj = _util.safe_get(obj, object(), type(parent))
    try:

        sig = specifiers.signature(obj)