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 }}
|
.. autoclass:: {{ objname }}
|
||||||
:members:
|
:members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:inherited-members:
|
:inherited-members: BaseModel
|
||||||
|
:exclude-members: model_computed_fields, model_config, model_fields
|
||||||
:special-members: __init__, __call__, __add__, __mul__
|
:special-members: __init__, __call__, __add__, __mul__
|
||||||
|
|
||||||
{% block methods %}
|
{% block methods %}
|
||||||
@@ -22,7 +23,14 @@
|
|||||||
.. autosummary::
|
.. autosummary::
|
||||||
:nosignatures:
|
:nosignatures:
|
||||||
{% for item in methods %}
|
{% 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 }}
|
~{{ name }}.{{ item }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
@@ -35,7 +43,12 @@
|
|||||||
|
|
||||||
.. autosummary::
|
.. autosummary::
|
||||||
{% for item in attributes %}
|
{% 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 }}
|
~{{ name }}.{{ item }}
|
||||||
|
{%- endif -%}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user