Skip to content

Commit d157db2

Browse files
committed
Implement previously missed typechecks
Signed-off-by: Samuel Monson <[email protected]>
1 parent adac21f commit d157db2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/guidellm/utils/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, *types: click.ParamType):
3535
self.types = types
3636
self.name = "".join(t.name for t in types)
3737

38-
def convert(self, value, param, ctx):
38+
def convert(self, value, param, ctx): # noqa: RET503
3939
fails = []
4040
for t in self.types:
4141
try:

tests/unit/preprocess/test_dataset.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ def test_process_dataset_non_empty(
133133
mock_save_to_file,
134134
tokenizer_mock,
135135
):
136-
from guidellm.preprocess.dataset import process_dataset
137-
138136
mock_dataset = [{"prompt": "Hello"}, {"prompt": "How are you?"}]
139137
mock_load_dataset.return_value = (mock_dataset, {"prompt_column": "prompt"})
140138
mock_check_processor.return_value = tokenizer_mock

tests/unit/test_cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Unit tests for CLI functionality, specifically the version flag.
33
"""
44

5+
import importlib.metadata
6+
import re
7+
58
import pytest
69
from click.testing import CliRunner
710

@@ -26,7 +29,6 @@ def test_version_flag_displays_actual_version():
2629
result = runner.invoke(cli, ["--version"])
2730

2831
assert result.exit_code == 0
29-
import re
3032

3133
version_pattern = r"guidellm version: \d+\.\d+"
3234
assert re.search(version_pattern, result.output)
@@ -84,8 +86,6 @@ def test_version_flag_case_sensitivity():
8486
@pytest.mark.integration
8587
def test_version_integration_with_actual_version():
8688
"""Integration test to verify version matches importlib.metadata."""
87-
import importlib.metadata
88-
8989
try:
9090
actual_version = importlib.metadata.version("guidellm")
9191

0 commit comments

Comments
 (0)