Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperCraeghs committed Mar 18, 2024
1 parent a9fd6e5 commit 61aa8ae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mlx/traceability/directives/item_pie_chart_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def perform_replacement(self, app, collection):
table = nodes.table()
if self.get('classes'):
table.get('classes').extend(self.get('classes'))

# Column and heading setup
titles = [nodes.paragraph('', title) for title in self['id_set']]
headings = [nodes.entry('', title) for title in titles]
Expand All @@ -114,6 +113,7 @@ def perform_replacement(self, app, collection):
tgroup += [nodes.colspec(colwidth=5) for _ in range(number_of_columns)]
tgroup += nodes.thead('', nodes.row('', *headings))
table += tgroup
# Table body
tbody = nodes.tbody()
tgroup += tbody
for label in self['matrix']:
Expand All @@ -135,13 +135,11 @@ def perform_replacement(self, app, collection):
tbody += row_without_targets
row_without_targets = nodes.row()
else:
source_row += nodes.entry('') # TODO: remove?
source_row += nodes.entry('')
if self.nested_target_regex.pattern:
source_row += nodes.entry('')
tbody += source_row

top_node += table

self.replace_self(top_node)

def _relationships_to_labels(self, relationships):
Expand Down

0 comments on commit 61aa8ae

Please sign in to comment.