Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
param obj: Object for which the privacy is reported.
type obj: C{model.Documentable}
rtype: C{model.PrivacyClass} member
"""
if documentable.fullName() == 'twisted.test':
# Match this package exactly, so that proto_helpers
# below is visible
return model.PrivacyClass.VISIBLE
current = documentable
while current:
if current.fullName() == 'twisted.test.proto_helpers':
return model.PrivacyClass.VISIBLE
if isinstance(current, model.Package) and current.name == 'test':
return model.PrivacyClass.HIDDEN
current = current.parent
return super(TwistedSystem, self).privacyClass(documentable)
def privacyClass(self, documentable):
"""
Report the privacy level for an object.
Hide all tests with the exception of L{twisted.test.proto_helpers}.
param obj: Object for which the privacy is reported.
type obj: C{model.Documentable}
rtype: C{model.PrivacyClass} member
"""
if documentable.fullName() == 'twisted.test':
# Match this package exactly, so that proto_helpers
# below is visible
return model.PrivacyClass.VISIBLE
current = documentable
while current:
if current.fullName() == 'twisted.test.proto_helpers':
return model.PrivacyClass.VISIBLE
if isinstance(current, model.Package) and current.name == 'test':
return model.PrivacyClass.HIDDEN
current = current.parent
return super(TwistedSystem, self).privacyClass(documentable)
def privacyClass(self, documentable):
"""
Report the privacy level for an object.
Hide all tests with the exception of L{twisted.test.proto_helpers}.
param obj: Object for which the privacy is reported.
type obj: C{model.Documentable}
rtype: C{model.PrivacyClass} member
"""
if documentable.fullName() == 'twisted.test':
# Match this package exactly, so that proto_helpers
# below is visible
return model.PrivacyClass.VISIBLE
current = documentable
while current:
if current.fullName() == 'twisted.test.proto_helpers':
return model.PrivacyClass.VISIBLE
if isinstance(current, model.Package) and current.name == 'test':
return model.PrivacyClass.HIDDEN
current = current.parent
return super(TwistedSystem, self).privacyClass(documentable)
Hide all tests with the exception of L{twisted.test.proto_helpers}.
param obj: Object for which the privacy is reported.
type obj: C{model.Documentable}
rtype: C{model.PrivacyClass} member
"""
if documentable.fullName() == 'twisted.test':
# Match this package exactly, so that proto_helpers
# below is visible
return model.PrivacyClass.VISIBLE
current = documentable
while current:
if current.fullName() == 'twisted.test.proto_helpers':
return model.PrivacyClass.VISIBLE
if isinstance(current, model.Package) and current.name == 'test':
return model.PrivacyClass.HIDDEN
current = current.parent
return super(TwistedSystem, self).privacyClass(documentable)