INNER CODE UNIT · Python

__get__

althonos/pyhmmer · src/pyhmmer/utils.py:65

    def __get__(
        self, obj: _S, cls: typing.Optional[typing.Type[_S]]
    ) -> typing.Callable[..., _T]:
        def _method(*args, **kwargs):  # type: ignore
            method = self.dispatcher.dispatch(args[0].__class__)
            return method.__get__(obj, cls)(*args, **kwargs)

        _method.__isabstractmethod__ = self.__isabstractmethod__  # type: ignore
        _method.register = self.register  # type: ignore
        functools.update_wrapper(_method, self.func)
        return _method

    @typing.overload
    def register(  # type: ignore
        self, 
        cls: typing.Type[typing.Any], 
        method: None = ...
    ) -> typing.Callable[[typing.Callable[..., _T]], typing.Callable[..., _T]]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…