pdoc/doc.py
def signature(self) -> inspect.Signature:
        """
        The function's signature.

        This usually returns an instance of `_PrettySignature`, a subclass of `inspect.Signature`
        that contains pdoc-specific optimizations. For example, long argument lists are split over multiple lines
        in repr(). Additionally, all types are already resolved.

        If the signature cannot be determined, a placeholder Signature object is returned.
        """
        if self.obj is object.__init__:
            # there is a weird edge case were inspect.signature returns a confusing (self, /, *args, **kwargs)
            # signature for the default __init__ method.
            return inspect.Signature()
        try:
            sig = _PrettySignature.from_callable(self.obj)
        except Exception:
            return inspect.Signature(
                [inspect.Parameter("unknown", inspect.Parameter.POSITIONAL_OR_KEYWORD)]
            )
        mod = inspect.getmodule(self.obj)
        globalns = _safe_getattr(mod, "__dict__", {})

        if self.name == "__init__":
            sig = sig.replace(return_annotation=empty)
        else:
            sig = sig.replace(
                return_annotation=safe_eval_type(
                    sig.return_annotation, globalns, self.fullname
                )
            )
        for p in sig.parameters.values():
            # noinspection PyTypeHints
            p._annotation = safe_eval_type(p.annotation, globalns, self.fullname)  # type: ignore
        return sig

        The function's signature.

        This usually returns an instance of `_PrettySignature`, a subclass of `inspect.Signature`
        that contains pdoc-specific optimizations. For example, long argument lists are split over multiple lines
        in repr(). Additionally, all types are already resolved.

        If the signature cannot be determined, a placeholder Signature object is returned.
        
The function's signature.
This usually returns an instance of `_PrettySignature`, a subclass of `inspect.Signature`
that contains pdoc-specific optimizations. For example, long argument lists are split over multiple lines
in repr(). Additionally, all types are already resolved.

If the signature cannot be determined, a placeholder Signature object is returned.
The function ' s signature . This usually returns an instance of ` _PrettySignature ` a subclass of ` inspect . Signature ` that contains pdoc - specific optimizations . For example long argument lists are split over multiple lines in repr () . Additionally all types are already resolved . If the signature cannot be determined a placeholder Signature object is returned .
def signature(self) -> inspect.Signature:
        if self.obj is object.__init__:
            return inspect.Signature()
        try:
            sig = _PrettySignature.from_callable(self.obj)
        except Exception:
            return inspect.Signature(
                [inspect.Parameter("unknown", inspect.Parameter.POSITIONAL_OR_KEYWORD)]
            )
        mod = inspect.getmodule(self.obj)
        globalns = _safe_getattr(mod, "__dict__", {})
        if self.name == "__init__":
            sig = sig.replace(return_annotation=empty)
        else:
            sig = sig.replace(
                return_annotation=safe_eval_type(
                    sig.return_annotation, globalns, self.fullname
                )
            )
        for p in sig.parameters.values():
            p._annotation = safe_eval_type(p.annotation, globalns, self.fullname)  
        return sig
def signature ( self ) -> inspect . Signature : if self . obj is object . __init__ : return inspect . Signature ( ) try : sig = _PrettySignature . from_callable ( self . obj ) except Exception : return inspect . Signature ( [ inspect . Parameter ( "unknown" , inspect . Parameter . POSITIONAL_OR_KEYWORD ) ] ) mod = inspect . getmodule ( self . obj ) globalns = _safe_getattr ( mod , "__dict__" , { } ) if self . name == "__init__" : sig = sig . replace ( return_annotation = empty ) else : sig = sig . replace ( return_annotation = safe_eval_type ( sig . return_annotation , globalns , self . fullname ) ) for p in sig . parameters . values ( ) : p . _annotation = safe_eval_type ( p . annotation , globalns , self . fullname ) return sig
The function's signature.
The function ' s signature .
"""
        The function's signature.

        This usually returns an instance of `_PrettySignature`, a subclass of `inspect.Signature`
        that contains pdoc-specific optimizations. For example, long argument lists are split over multiple lines
        in repr(). Additionally, all types are already resolved.

        If the signature cannot be determined, a placeholder Signature object is returned.
        """ # there is a weird edge case were inspect.signature returns a confusing (self, /, *args, **kwargs) # signature for the default __init__ method. # noinspection PyTypeHints # type: ignore
self