From 0a31dd0dd569582e78c211e8549cd146b6fcb523 Mon Sep 17 00:00:00 2001 From: Simon Kallweit Date: Fri, 20 Dec 2024 11:05:14 +0100 Subject: [PATCH] ignore typing issues --- examples/pathtracer/pathtracer.py | 4 +++- src/sgl/core/tests/test_bitmap.py | 2 +- src/sgl/core/tests/test_struct.py | 4 ++-- src/sgl/device/tests/test_declrefs.py | 2 +- src/sgl/device/tests/test_shader_cursor.py | 2 +- src/sgl/utils/tests/test_texture_loader.py | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/examples/pathtracer/pathtracer.py b/examples/pathtracer/pathtracer.py index 301a18a9..2b7853b4 100644 --- a/examples/pathtracer/pathtracer.py +++ b/examples/pathtracer/pathtracer.py @@ -140,7 +140,9 @@ def __init__(self, base_color: "sgl.float3param" = sgl.float3(0.5)): class Mesh: def __init__( - self, vertices: npt.NDArray[np.float32], indices: npt.NDArray[np.uint32] + self, + vertices: npt.NDArray[np.float32], # type: ignore + indices: npt.NDArray[np.uint32], # type: ignore ): super().__init__() assert vertices.ndim == 2 and vertices.dtype == np.float32 diff --git a/src/sgl/core/tests/test_bitmap.py b/src/sgl/core/tests/test_bitmap.py index 16d810e4..defe20bd 100644 --- a/src/sgl/core/tests/test_bitmap.py +++ b/src/sgl/core/tests/test_bitmap.py @@ -34,7 +34,7 @@ def create_test_array( width: int, height: int, channels: int, - dtype: npt.DTypeLike, + dtype: npt.DTypeLike, # type: ignore type_range: tuple[float, float], ): img = np.zeros((height, width, channels), dtype) diff --git a/src/sgl/core/tests/test_struct.py b/src/sgl/core/tests/test_struct.py index 84c1212a..68b241e4 100644 --- a/src/sgl/core/tests/test_struct.py +++ b/src/sgl/core/tests/test_struct.py @@ -44,8 +44,8 @@ def check_conversion( converter: StructConverter, src_fmt: str | bytes, dst_fmt: str | bytes, - src_values: npt.ArrayLike, - ref_values: Optional[npt.ArrayLike] = None, + src_values: npt.ArrayLike, # type: ignore + ref_values: Optional[npt.ArrayLike] = None, # type: ignore err_thresh: float = 1e-6, ): # print("\nsrc_values: " + str(src_values)) diff --git a/src/sgl/device/tests/test_declrefs.py b/src/sgl/device/tests/test_declrefs.py index 39bff706..4727a09d 100644 --- a/src/sgl/device/tests/test_declrefs.py +++ b/src/sgl/device/tests/test_declrefs.py @@ -4,7 +4,7 @@ import sys import sgl from pathlib import Path -from deepdiff import DeepDiff +from deepdiff.diff import DeepDiff sys.path.append(str(Path(__file__).parent)) import sglhelpers as helpers diff --git a/src/sgl/device/tests/test_shader_cursor.py b/src/sgl/device/tests/test_shader_cursor.py index 864ebe51..3f6573c4 100644 --- a/src/sgl/device/tests/test_shader_cursor.py +++ b/src/sgl/device/tests/test_shader_cursor.py @@ -31,7 +31,7 @@ class TypeInfo: # encoding of read back data struct: str # numpy dtype - dtype: DTypeLike + dtype: DTypeLike # type: ignore TYPE_INFOS = { diff --git a/src/sgl/utils/tests/test_texture_loader.py b/src/sgl/utils/tests/test_texture_loader.py index ce7773ca..8782cdae 100644 --- a/src/sgl/utils/tests/test_texture_loader.py +++ b/src/sgl/utils/tests/test_texture_loader.py @@ -144,7 +144,7 @@ def create_test_array( width: int, height: int, channels: int, - dtype: npt.DTypeLike, + dtype: npt.DTypeLike, # type: ignore type_range: tuple[float, float], ): img = np.zeros((height, width, channels), dtype)