From bef44f78b84ffa6fb6687d75f38d4cca115872fb Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Wed, 25 Dec 2024 22:07:48 +1300 Subject: [PATCH 1/2] Fix various static typing issues. --- colour_hdri/network/graphs.py | 4 ++-- colour_hdri/network/nodes.py | 2 +- colour_hdri/sampling/variance_minimization.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/colour_hdri/network/graphs.py b/colour_hdri/network/graphs.py index 660c6bc..0a86c39 100644 --- a/colour_hdri/network/graphs.py +++ b/colour_hdri/network/graphs.py @@ -1013,8 +1013,8 @@ def process(self, **kwargs: Any) -> None: "output", list( zip( - self.nodes["ParallelForMultiprocess"].get_output("results"), - self.nodes["GraphPostMergeHDRI"].get_output("output"), + self.nodes["ParallelForMultiprocess"].get_output("results"), # pyright: ignore + self.nodes["GraphPostMergeHDRI"].get_output("output"), # pyright: ignore strict=False, ) ), diff --git a/colour_hdri/network/nodes.py b/colour_hdri/network/nodes.py index e8bb793..e3c3c05 100644 --- a/colour_hdri/network/nodes.py +++ b/colour_hdri/network/nodes.py @@ -1511,7 +1511,7 @@ def process(self, **kwargs: Any) -> None: # noqa: ARG002 self.log(f'"{image_path}" image does not exist!') return - median.append(np.median(read_image_OpenImageIO(image_path))) # pyright: ignore + median.append(np.median(read_image_OpenImageIO(image_path))) normalising_factor = np.median(median) diff --git a/colour_hdri/sampling/variance_minimization.py b/colour_hdri/sampling/variance_minimization.py index 4152450..90c4059 100644 --- a/colour_hdri/sampling/variance_minimization.py +++ b/colour_hdri/sampling/variance_minimization.py @@ -265,7 +265,7 @@ def light_probe_sampling_variance_minimization_Viriyothai2009( Light_Specification( (c / np.array(Y.shape))[::-1], np.sum(np.sum(light_probe_c, 0), 0), - c, + c, # pyright: ignore ) ) From 5c932c7bad1a27b638d11afde69427ba3562bf69 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Wed, 25 Dec 2024 22:07:59 +1300 Subject: [PATCH 2/2] Fix broken unit tests. --- colour_hdri/utilities/tests/test_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colour_hdri/utilities/tests/test_image.py b/colour_hdri/utilities/tests/test_image.py index ebe8ba6..3b313f3 100644 --- a/colour_hdri/utilities/tests/test_image.py +++ b/colour_hdri/utilities/tests/test_image.py @@ -91,7 +91,7 @@ def test_required_attributes(self) -> None: required_attributes = ("cctf_decoding",) for attribute in required_attributes: - assert attribute in dir(Image) + assert attribute in dir(ImageStack) def test_required_methods(self) -> None: """Test the presence of required methods."""