How to use the pydoctor.zopeinterface.ZopeInterfaceModuleVisitor 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
fn = self.expandName(name) + "." + getAttr[1]
            else:
                fn = self.expandName(decorator[0].name)

            if fn == "twisted.python.deprecate.deprecated":
                try:
                    self._deprecated_info = deprecatedToUsefulText(
                        self.name, decorator)
                except AttributeError:
                    # It's a reference or something that we can't figure out
                    # from the AST.
                    pass



class TwistedModuleVisitor(zopeinterface.ZopeInterfaceModuleVisitor):

    def visitClass(self, node):
        """
        Called when a class is visited.
        """
        super(TwistedModuleVisitor, self).visitClass(node)

        cls = self.builder.current.contents[node.name]

        getDeprecated(cls, list(cls.raw_decorators))


    def visitFunction(self, node):
        """
        Called when a class is visited.
        """