Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
singlestore-labs
GitHub Repository: singlestore-labs/singlestoredb-python
Path: blob/main/singlestoredb/docstring/tests/_pydoctor.py
469 views
1
"""Private pydoctor customization code in order to exclude the package
2
singlestoredb.docstring.tests from the API documentation. Based on Twisted code.
3
"""
4
# pylint: disable=invalid-name
5
6
try:
7
from pydoctor.model import Documentable, PrivacyClass, System
8
except ImportError:
9
pass
10
else:
11
12
class HidesTestsPydoctorSystem(System):
13
"""A PyDoctor "system" used to generate the docs."""
14
15
def privacyClass(self, documentable: Documentable) -> PrivacyClass:
16
"""Report the privacy level for an object. Hide the module
17
'singlestoredb.docstring.tests'.
18
"""
19
if documentable.fullName().startswith('singlestoredb.docstring.tests'):
20
return PrivacyClass.HIDDEN
21
return super().privacyClass(documentable)
22
23