Skip to content

Commit 502c14f

Browse files
refactor: Linter comments
1 parent 4b2819c commit 502c14f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/safeds/data/image/containers/test_image.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
from pathlib import Path
2-
from typing import TYPE_CHECKING
32

43
import pytest
54
import torch
65
from syrupy import SnapshotAssertion
7-
8-
if TYPE_CHECKING:
9-
from torch.types import Device
6+
from torch.types import Device
107

118
from safeds.data.image.containers import Image
129
from safeds.data.tabular.containers import Table
@@ -208,7 +205,7 @@ def test_should_be_equal(self, resource_path: str, device: Device) -> None:
208205
@pytest.mark.parametrize(
209206
"device", _test_devices(), ids=_test_devices_ids()
210207
)
211-
def test_should_not_be_equal(self, device) -> None:
208+
def test_should_not_be_equal(self, device: Device) -> None:
212209
_skip_if_device_not_available(device)
213210
image = Image.from_file(resolve_resource_path("image/plane.png"), device)
214211
image2 = Image.from_file(resolve_resource_path("image/white_square.png"), device)
@@ -297,7 +294,7 @@ def test_should_return_resized_image(
297294

298295
class TestDevices:
299296

300-
def test_should_change_device(self):
297+
def test_should_change_device(self) -> None:
301298
_skip_if_device_not_available(_device_cuda)
302299
image = Image.from_file(resolve_resource_path("image/plane.png"), torch.device("cpu"))
303300
new_device = torch.device("cuda", 0)

0 commit comments

Comments
 (0)