File tree 2 files changed +3
-5
lines changed
src/mkdocstrings_handlers/python/templates/material/_base 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 28
28
{%- with function = class.members["__init__"] -%}
29
29
{%- filter highlight(language="python", inline=True) -%}
30
30
{% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}
31
- {% with no_self = True %}
32
- {%- include "signature.html" with context -%}
33
- {% endwith %}
31
+ {%- include "signature.html" with context -%}
34
32
{%- endfilter -%}
35
33
{%- endwith -%}
36
34
{% else %}
45
43
46
44
{% if config.separate_signature and config.merge_init_into_class %}
47
45
{% if "__init__" in class.members %}
48
- {% with function = class.members["__init__"], no_self = True %}
46
+ {% with function = class.members["__init__"] %}
49
47
{% filter highlight(language="python", inline=False) %}
50
48
{% filter format_signature(config.line_length) %}
51
49
{% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}
Original file line number Diff line number Diff line change 10
10
11
11
(
12
12
{%- for parameter in function.parameters -%}
13
- {%- if parameter.name != "self" or not no_self -%}
13
+ {%- if parameter.name not in ( "self", "cls") or loop.index0 > 0 or not (function.parent and function.parent.is_class) -%}
14
14
15
15
{%- if parameter.kind.value == "positional-only" -%}
16
16
{%- if ns.render_pos_only_separator -%}
You can’t perform that action at this time.
0 commit comments