Skip to content

Commit 5b83c2d

Browse files
committed
fixes from copilot review
Signed-off-by: Mark Kurtz <[email protected]>
1 parent d15cf17 commit 5b83c2d

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/guidellm/benchmark/progress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def format_progress_display(
253253
decimal_places: Optional[int] = None,
254254
) -> str:
255255
if decimal_places is None and digits_places is None:
256-
formatted_number = f"{value}:.0f"
256+
formatted_number = f"{value:.0f}"
257257
elif digits_places is None:
258258
formatted_number = f"{value:.{decimal_places}f}"
259259
elif decimal_places is None:

src/guidellm/utils/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
clean_text,
5959
filter_text,
6060
format_value_display,
61-
is_puncutation,
61+
is_punctuation,
6262
load_text,
6363
split_text,
6464
split_text_list_by_length,
@@ -109,7 +109,7 @@
109109
"filter_text",
110110
"format_value_display",
111111
"get_literal_vals",
112-
"is_puncutation",
112+
"is_punctuation",
113113
"load_text",
114114
"safe_add",
115115
"safe_divide",

src/guidellm/utils/synchronous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import asyncio
1313
import contextlib
14-
from datetime import time
14+
import time
1515
from multiprocessing.synchronize import Barrier as ProcessingBarrier
1616
from multiprocessing.synchronize import Event as ProcessingEvent
1717
from threading import Barrier as ThreadingBarrier

src/guidellm/utils/text.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"clean_text",
3232
"filter_text",
3333
"format_value_display",
34-
"is_puncutation",
34+
"is_punctuation",
3535
"load_text",
3636
"split_text",
3737
"split_text_list_by_length",
@@ -64,7 +64,7 @@ def format_value_display(
6464
:return: Formatted string with value, units, and colored label
6565
"""
6666
if decimal_places is None and digits_places is None:
67-
formatted_number = f"{value}:.0f"
67+
formatted_number = f"{value:.0f}"
6868
elif digits_places is None:
6969
formatted_number = f"{value:.{decimal_places}f}"
7070
elif decimal_places is None:
@@ -268,7 +268,7 @@ def load_text(data: str | Path, encoding: str | None = None) -> str:
268268
return data.read_text(encoding=encoding)
269269

270270

271-
def is_puncutation(text: str) -> bool:
271+
def is_punctuation(text: str) -> bool:
272272
"""
273273
Check if a single character is a punctuation mark.
274274
@@ -332,7 +332,7 @@ def create_text(self, start: int, length: int) -> str:
332332
index = (start + counter) % len(self.words)
333333
add_word = self.words[index]
334334

335-
if counter != 0 and not is_puncutation(add_word):
335+
if counter != 0 and not is_punctuation(add_word):
336336
text += " "
337337

338338
text += add_word

tests/unit/utils/test_text.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
clean_text,
1515
filter_text,
1616
format_value_display,
17-
is_puncutation,
17+
is_punctuation,
1818
load_text,
1919
split_text,
2020
split_text_list_by_length,
@@ -372,8 +372,8 @@ def test_url_error(self, mock_client):
372372
load_text("http://example.com/error.txt")
373373

374374

375-
class TestIsPuncutation:
376-
"""Test suite for is_puncutation."""
375+
class TestIsPunctuation:
376+
"""Test suite for is_punctuation."""
377377

378378
@pytest.mark.smoke
379379
@pytest.mark.parametrize(
@@ -392,8 +392,8 @@ class TestIsPuncutation:
392392
],
393393
)
394394
def test_invocation(self, text, expected):
395-
"""Test is_puncutation with various characters."""
396-
result = is_puncutation(text)
395+
"""Test is_punctuation with various characters."""
396+
result = is_punctuation(text)
397397
assert result == expected
398398

399399
@pytest.mark.sanity
@@ -405,9 +405,9 @@ def test_invocation(self, text, expected):
405405
],
406406
)
407407
def test_invalid_invocation(self, text):
408-
"""Test is_puncutation with invalid inputs."""
408+
"""Test is_punctuation with invalid inputs."""
409409
with pytest.raises((TypeError, AttributeError)):
410-
is_puncutation(text)
410+
is_punctuation(text)
411411

412412

413413
class TestEndlessTextCreator:

0 commit comments

Comments
 (0)