Skip to content

Commit

Permalink
Merge pull request #1787 from strictdoc-project/stanislaw/debt
Browse files Browse the repository at this point in the history
Code climate: sdoc/models/section: remove unused code
  • Loading branch information
stanislaw authored Apr 22, 2024
2 parents e7c0373 + 78c1a61 commit 4290f1c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
4 changes: 0 additions & 4 deletions strictdoc/backend/sdoc/models/section.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def __init__(
requirement_prefix: Optional[str],
free_texts: List[FreeText],
section_contents: List[SDocObject],
root_section=False,
):
self.parent = parent

Expand Down Expand Up @@ -60,9 +59,6 @@ def __init__(

# This is always true, unless the node is filtered out with --filter-requirements.
self.ng_whitelisted = True
# A root section is an artificial section where a root of an included
# document is mounted to when the document is included to another document.
self.root_section = root_section

@staticmethod
def get_type_string() -> str:
Expand Down
7 changes: 0 additions & 7 deletions strictdoc/export/html/templates/components/node/index.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

{% set node_type = sdoc_entity.get_type_string() %}
{% set is_not_standalone = view_object.project_config.is_running_on_server and not view_object.standalone %}
{% set is_root_section = (sdoc_entity.root_section is defined and sdoc_entity.root_section == true) %}
{% set is_included = sdoc_entity.document_is_included() %}
{% set node_type_string = sdoc_entity.get_node_type_string() %}

Expand All @@ -36,9 +35,6 @@
show-node-type-name="{{ node_type_string }}"
{%- endif %}
data-included-document="{{ is_included }}"
{%- if is_root_section %}
data-included-root-section="{{ is_root_section }}"
{%- endif %}
data-testid="node-{{ node_type }}"
>

Expand All @@ -47,9 +43,6 @@
{# {% if is_included %}
<div style="color:green">My home doc is <b>"{{ sdoc_entity.document.title }}"</b>.</div>
<div style="color:blue">My including doc is <b>"{{ sdoc_entity.parent_or_including_document.title }}"</b>.</div>
{% if root_section %}
<div style="color:red">I am a fragment!</div>
{% endif %}
{% else %}
<div style="color:rgb(255, 200, 0)">I'm just a simple node!</div>
{% endif %} #}
Expand Down

0 comments on commit 4290f1c

Please sign in to comment.