Skip to content

Commit a77daa2

Browse files
committed
include name in repr
1 parent 8183747 commit a77daa2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/ctapipe/core/component.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def _repr_html_(self):
260260
docstring = publish_parts(clean_doc, writer=writer)["html_body"]
261261
lines = [
262262
'<div style="border:1px solid black; max-width: 700px; padding:2em; word-wrap:break-word;">',
263-
f"<b>{name}</b>",
263+
f"<h3>{name}</h3>",
264264
docstring,
265265
"<table>",
266266
" <colgroup>",
@@ -293,8 +293,9 @@ def _repr_html_(self):
293293
lines.append(" </tbody>")
294294
lines.append("</table>")
295295

296-
for val in self.__dict__.values():
296+
for name, val in self.__dict__.items():
297297
if isinstance(val, Component):
298+
lines.append(f"<h4>{name}:</h4>")
298299
lines.append(val._repr_html_())
299300

300301
lines.append("</div>")

0 commit comments

Comments
 (0)