Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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