Skip to content

Commit a655d76

Browse files
committed
Simplified type hints
1 parent e39765d commit a655d76

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

Tests/test_imagecms.py

+3-14
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import shutil
77
from io import BytesIO
88
from pathlib import Path
9+
from typing import Any
910

1011
import pytest
1112

@@ -336,25 +337,13 @@ def test_extended_information() -> None:
336337
p = o.profile
337338

338339
def assert_truncated_tuple_equal(
339-
tup1: tuple[tuple[float, float, float], ...] | tuple[float],
340-
tup2: (
341-
tuple[tuple[tuple[float, float, float], ...], ...]
342-
| tuple[tuple[float, float, float], ...]
343-
| tuple[float]
344-
),
345-
digits: int = 10,
340+
tup1: tuple[Any, ...], tup2: tuple[Any, ...], digits: int = 10
346341
) -> None:
347342
# Helper function to reduce precision of tuples of floats
348343
# recursively and then check equality.
349344
power = 10**digits
350345

351-
def truncate_tuple(
352-
tuple_or_float: (
353-
tuple[tuple[tuple[float, float, float], ...], ...]
354-
| tuple[tuple[float, float, float], ...]
355-
| tuple[float, ...]
356-
)
357-
) -> tuple[tuple[float, ...], ...]:
346+
def truncate_tuple(tuple_or_float: tuple[Any, ...]) -> tuple[Any, ...]:
358347
return tuple(
359348
(
360349
truncate_tuple(val)

0 commit comments

Comments
 (0)