* api docs

* more docstrings

* logs

* docs shakeup

* fix notes, added intro to all apis

* Remove defaults to

* add note to events

* note

* use fira code
This commit is contained in:
Will McGugan
2023-04-08 15:35:49 +01:00
committed by GitHub
parent 5726a20e8e
commit 2244b1161e
103 changed files with 879 additions and 557 deletions

View File

@@ -13,7 +13,9 @@
{% set show_full_path = config.show_object_full_path %}
{% endif %}
{% if not root or config.show_root_heading %}
{% if 1 %}
{% filter heading(heading_level,
role="class",
@@ -34,7 +36,7 @@
<code>{% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}</code>
{% endif %}
{% with labels = class.labels %}
{% with labels = ['class'] %}
{% include "labels.html" with context %}
{% endwith %}
@@ -43,11 +45,10 @@
{% if config.separate_signature and config.merge_init_into_class %}
{% if "__init__" in class.members %}
{% with function = class.members["__init__"] %}
{% filter highlight(language="python", inline=False) %}
class {% filter format_signature(config.line_length) %}
{% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}
{% include "signature.html" with context %}
{% endfilter %}
{% filter highlight(language="python", inline=False) -%}
def {% filter format_signature(config.line_length) %}
__init__{% include "signature.html" with context %}
{% endfilter %}:
{% endfilter %}
{% endwith %}
{% endif %}

View File

@@ -0,0 +1,5 @@
{{ log.debug("Rendering admonition") }}
<details class="{{ section.value.kind }}" open>
<summary>{{ section.title|convert_markdown(heading_level, html_id, strip_paragraph=True) }}</summary>
{{ section.value.contents|convert_markdown(heading_level, html_id) }}
</details>

View File

@@ -29,8 +29,7 @@
{% include "signature.html" with context %}
{% endfilter %}
{% endif %}
{% with labels = function.labels %}
{% with labels = function.labels or [(function.parameters._parameters_list and function.parameters._parameters_list[0].name == 'self') and 'method' or 'function'] %}
{% include "labels.html" with context %}
{% endwith %}
@@ -41,7 +40,7 @@
def {% filter format_signature(config.line_length) %}
{% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif %}
{% include "signature.html" with context %}
{% endfilter %}
{% endfilter %}:
{% endfilter %}
{% endif %}

View File

@@ -10,14 +10,14 @@
(
{%- for parameter in function.parameters -%}
{%- if parameter.name not in ("self", "cls") or loop.index0 > 0 or not (function.parent and function.parent.is_class) -%}
{%- if 1 -%}
{%- if parameter.kind.value == "positional-only" -%}
{%- set ns.has_pos_only = True -%}
{%- else -%}
{%- if ns.has_pos_only and ns.render_pos_only_separator -%}
{%- set ns.render_pos_only_separator = False %}/, {% endif -%}
{%- if parameter.kind.value == "keyword-only" -%}
{%- if parameter.kind.value == "keyword-only" -%}
{%- if ns.render_kw_only_separator -%}
{%- set ns.render_kw_only_separator = False %}*, {% endif -%}
{%- endif -%}