3110 - change docs custom class template to remove things inherited from basemodel
This commit is contained in:
17
docs/_templates/custom-class-template.rst
vendored
17
docs/_templates/custom-class-template.rst
vendored
@@ -12,7 +12,8 @@
|
||||
.. autoclass:: {{ objname }}
|
||||
:members:
|
||||
:show-inheritance:
|
||||
:inherited-members:
|
||||
:inherited-members: BaseModel
|
||||
:exclude-members: model_computed_fields, model_config, model_fields
|
||||
:special-members: __init__, __call__, __add__, __mul__
|
||||
|
||||
{% block methods %}
|
||||
@@ -22,7 +23,14 @@
|
||||
.. autosummary::
|
||||
:nosignatures:
|
||||
{% for item in methods %}
|
||||
{%- if not item.startswith('_') %}
|
||||
{%- if not item.startswith('_') and item not in [
|
||||
'construct', 'copy', 'dict', 'from_orm', 'json', 'model_construct',
|
||||
'model_copy', 'model_dump', 'model_dump_json', 'model_json_schema',
|
||||
'model_parametrized_name', 'model_post_init', 'model_rebuild', '',
|
||||
'model_validate', 'model_validate_json', 'model_validate_strings',
|
||||
'parse_file', 'parse_obj', 'parse_raw', 'schema', 'schema_json',
|
||||
'update_forward_refs', 'validate',
|
||||
] %}
|
||||
~{{ name }}.{{ item }}
|
||||
{%- endif -%}
|
||||
{%- endfor %}
|
||||
@@ -35,7 +43,12 @@
|
||||
|
||||
.. autosummary::
|
||||
{% for item in attributes %}
|
||||
{%- if not item.startswith('_') and item not in [
|
||||
'model_computed_fields', 'model_config', 'model_extra', 'model_fields',
|
||||
'model_fields_set',
|
||||
] %}
|
||||
~{{ name }}.{{ item }}
|
||||
{%- endif -%}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user