Skip to content

Commit

Permalink
fix: Fix rendering init method source when merged into class
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 15, 2022
1 parent 7c49937 commit 4a20aea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@

{% if config.show_source %}
{% if config.merge_init_into_class %}
{% if "__init__" in class.members %}
{% if "__init__" in class.members and class.members["__init__"].source %}
<details class="quote">
<summary>Source code in <code>{{ class.relative_filepath }}</code></summary>
{{ class.members["__init__"].source|highlight(language="python", linestart=class.lineno, linenums=True) }}
{{ class.members["__init__"].source|highlight(language="python", linestart=class.members["__init__"].lineno, linenums=True) }}
</details>
{% endif %}
{% elif class.source %}
Expand Down

0 comments on commit 4a20aea

Please sign in to comment.