Skip to content

Commit

Permalink
mypy error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailKardash committed Mar 18, 2024
1 parent 324ae72 commit 794a538
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions harness/tests/experiment/pytorch/test_pytorch_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ def test_to_device_warnings(dedup_between_calls: bool) -> None:
handler = handlers.QueueHandler(q)
logger.addHandler(handler)
try:
if dedup_between_calls:
warned_types = set() # type: ignore
else:
warned_types = None
warned_types = set() if dedup_between_calls else None # type: ignore
pytorch.to_device(["string_data", "string_data"], "cpu", warned_types) # type: ignore
pytorch.to_device(["string_data", "string_data"], "cpu", warned_types) # type: ignore

Expand Down

0 comments on commit 794a538

Please sign in to comment.