Skip to content

Commit 9e41c33

Browse files
Remove header in usethis list (#532)
* Remove header in usethis list * Update test suite to reflect changes
1 parent feddbdd commit 9e41c33

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/usethis/_core/list.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ def rich_style(self) -> str:
2727

2828

2929
class UsageTable(BaseModel):
30-
title: str
3130
rows: list[UsageRow]
3231

3332
def to_rich(self) -> Table:
3433
"""Convert the table to a rich Table."""
35-
table = Table(title=self.title, show_lines=True)
34+
table = Table(show_lines=True)
3635
table.add_column("Category", justify="left")
3736
table.add_column("Name", justify="left")
3837
table.add_column("Status", justify="left")
@@ -90,7 +89,7 @@ def show_usage_table() -> None:
9089

9190
def get_usage_table() -> UsageTable:
9291
"""Get the usage table."""
93-
table = UsageTable(title="Usage", rows=[])
92+
table = UsageTable(rows=[])
9493

9594
# Add rows for each tool
9695
for tool in ALL_TOOLS:

tests/usethis/_core/test_list.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def test_empty_project(self, tmp_path: Path):
3131

3232
# Assert
3333
expected = UsageTable(
34-
title="Usage",
3534
rows=[
3635
UsageRow(category="tool", name="Codespell", status="unused"),
3736
UsageRow(category="tool", name="coverage", status="unused"),
@@ -60,7 +59,6 @@ def test_ruff_used(self, tmp_path: Path):
6059

6160
# Assert
6261
expected = UsageTable(
63-
title="Usage",
6462
rows=[
6563
UsageRow(category="tool", name="Codespell", status="unused"),
6664
UsageRow(category="tool", name="coverage", status="unused"),
@@ -86,7 +84,6 @@ def test_uv_init_case(self, uv_init_dir: Path):
8684

8785
# Assert
8886
expected = UsageTable(
89-
title="Usage",
9087
rows=[
9188
UsageRow(category="tool", name="Codespell", status="unused"),
9289
UsageRow(category="tool", name="coverage", status="unused"),

0 commit comments

Comments
 (0)