-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Context
A test method within a unittest class.
Code
from typing import cast, Tuple
...
def test_run(self):
"""Use the sample initial states and action choices for testing."""
initial_input: int = 1 # Ruff warns this variable is defined but not used
actions: Tuple[int, ...] = (199, 213, 111, 333) # Ruff warns this variable is defined but not used
result = cast(
typ=Tuple[Any],
val=self.interactor.run(llm_input=initial_input, action_sequence=actions),
)
self.assertTupleEqual(tuple1=result, tuple2=(1, 0, True, {}))
logging.info(msg="Multi-round interactor passed testing.")Problem
Ruff Cannot recognise the usage of a variable inside typing.cast. Even though it is being used.
System Details
- ruff 0.11.5
- uv 0.5.13
- Operating system: Linux mint 22
Version
0.11.5
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working