How to use the pydoctor.zopeinterface.ZopeInterfaceFunction function in pydoctor

To help you get started, we’ve selected a few pydoctor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twisted / twisted / src / twisted / python / _pydoctor.py View on Github external
from twisted.python.deprecate import _getDeprecationWarningString

    version = versionToUsefulObject(deprecated[1])
    if deprecated[2]:
        if isinstance(deprecated[2], ast.Keyword):
            replacement = deprecated[2].asList()[1].value
        else:
            replacement = deprecated[2].value
    else:
        replacement = None

    return _getDeprecationWarningString(name, version, replacement=replacement) + "."



class TwistedFunction(zopeinterface.ZopeInterfaceFunction):

    def docsources(self):

        if self.decorators:
            getDeprecated(self, list(self.decorators))

        for x in super(TwistedFunction, self).docsources():
            yield x



class TwistedASTBuilder(zopeinterface.ZopeInterfaceASTBuilder):
    # Vistor is not a typo...
    ModuleVistor = TwistedModuleVisitor