qrenderer.exclude_attributes
exclude_attributes(spec)
Exclude the parameters of functions/class in the documentation
When a function has a deprecated attribute, we may want to exclude it from the documentation. Use this function in your _renderer.py
file to specify them.
Parameters
Examples
Assuming we are documenting ClassA
and ClassB
with the deprecated attributes marked as shown below.
class ClassA:
int = 1
a: str = "rock"
b: bool = False # deprecated
c:
class ClassB:
int = 1
a: str = "paper" # deprecated
b:
@property
def value(self): # deprecated
return 1
We would use this to exclude the attributes from the documentation.
from qrenderer import exclude_attributes
exclude_attributes({"package.ClassA": "c",
"package.ClassB": ("b", "value")
})