Skip to content

Commit 3f960a9

Browse files
committed
use truncate helper in comments list
1 parent 49d5e26 commit 3f960a9

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/ytstudio/commands/comments.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from ytstudio.auth import api, get_authenticated_service, handle_api_error
99
from ytstudio.demo import DEMO_COMMENTS, is_demo_mode
10-
from ytstudio.ui import console, time_ago
10+
from ytstudio.ui import console, time_ago, truncate
1111

1212
app = typer.Typer(help="Comment commands")
1313

@@ -135,9 +135,7 @@ def list_comments(
135135
console.print(f"\n[bold]{label} Comments ({len(comments)})[/bold] — {scope}\n")
136136

137137
for c in comments:
138-
text = c.text[:150]
139-
if len(c.text) > 150:
140-
text += "..."
138+
text = truncate(c.text, 150)
141139

142140
like_str = f" [dim]({c.likes} likes)[/dim]" if c.likes else ""
143141
video_str = f" [dim cyan]on {c.video_id}[/dim cyan]" if c.video_id and not video_id else ""

0 commit comments

Comments
 (0)