From 8bfad9c644463bf3eee1e0fbef82ef30fb5aac54 Mon Sep 17 00:00:00 2001 From: Khushityagi90 Date: Mon, 21 Sep 2026 12:14:13 +0530 Subject: [PATCH 1/3] ty: un-ignore invalid-type-form --- computer_vision/mean_threshold.py | 2 +- computer_vision/otsu_threshold.py | 2 +- digital_image_processing/change_brightness.py | 2 +- digital_image_processing/change_contrast.py | 2 +- pyproject.toml | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/computer_vision/mean_threshold.py b/computer_vision/mean_threshold.py index 76657933d6a9..5e8746faf9d2 100644 --- a/computer_vision/mean_threshold.py +++ b/computer_vision/mean_threshold.py @@ -6,7 +6,7 @@ """ -def mean_threshold(image: Image) -> Image: +def mean_threshold(image: Image) -> Image.Image: """ image: is a grayscale PIL image object """ diff --git a/computer_vision/otsu_threshold.py b/computer_vision/otsu_threshold.py index 7e9003789339..8485d80d6f46 100644 --- a/computer_vision/otsu_threshold.py +++ b/computer_vision/otsu_threshold.py @@ -7,7 +7,7 @@ """ -def otsu_threshold(image: Image) -> Image: +def otsu_threshold(image: Image) -> Image.Image: """ Applies Otsu's thresholding method to a grayscale image. diff --git a/digital_image_processing/change_brightness.py b/digital_image_processing/change_brightness.py index a2d99f42d722..bb409b73dfaa 100644 --- a/digital_image_processing/change_brightness.py +++ b/digital_image_processing/change_brightness.py @@ -1,7 +1,7 @@ from PIL import Image -def change_brightness(img: Image, level: float) -> Image: +def change_brightness(img: Image, level: float) -> Image.Image: """ Change the brightness of a PIL Image to a given level. diff --git a/digital_image_processing/change_contrast.py b/digital_image_processing/change_contrast.py index 7e49694708f8..a88dacb4b732 100644 --- a/digital_image_processing/change_contrast.py +++ b/digital_image_processing/change_contrast.py @@ -11,7 +11,7 @@ from PIL import Image -def change_contrast(img: Image, level: int) -> Image: +def change_contrast(img: Image, level: int) -> Image.Image: """ Function to change contrast """ diff --git a/pyproject.toml b/pyproject.toml index 3ce2597d22f4..e5181860e03c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -206,7 +206,6 @@ rules.deprecated = "ignore" rules.invalid-argument-type = "ignore" rules.invalid-return-type = "ignore" rules.invalid-type-arguments = "ignore" -rules.invalid-type-form = "ignore" rules.no-matching-overload = "ignore" rules.not-iterable = "ignore" rules.not-subscriptable = "ignore" From 87d9db1556f2af2e6ef2904a7fe27ea6780223aa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2026 07:06:27 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- data_structures/linked_list/remove_nth_node_from_end_of_list.py | 1 - 1 file changed, 1 deletion(-) diff --git a/data_structures/linked_list/remove_nth_node_from_end_of_list.py b/data_structures/linked_list/remove_nth_node_from_end_of_list.py index 7ca0e320d29c..4bb048c7ca1c 100644 --- a/data_structures/linked_list/remove_nth_node_from_end_of_list.py +++ b/data_structures/linked_list/remove_nth_node_from_end_of_list.py @@ -1,6 +1,5 @@ """Learn more about this algorithm: https://www.geeksforgeeks.org/delete-nth-node-from-the-end-of-the-given-linked-list/""" - from __future__ import annotations from dataclasses import dataclass From 5d3d96fac11514f925b645dfd10af8e3078d0706 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 21 Sep 2026 12:27:58 +0200 Subject: [PATCH 3/3] Apply batched suggestions from code review Co-authored-by: Christian Clauss --- computer_vision/mean_threshold.py | 2 +- computer_vision/otsu_threshold.py | 2 +- digital_image_processing/change_brightness.py | 2 +- digital_image_processing/change_contrast.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/computer_vision/mean_threshold.py b/computer_vision/mean_threshold.py index 5e8746faf9d2..47f9ebcb063b 100644 --- a/computer_vision/mean_threshold.py +++ b/computer_vision/mean_threshold.py @@ -6,7 +6,7 @@ """ -def mean_threshold(image: Image) -> Image.Image: +def mean_threshold(image: Image.Image) -> Image.Image: """ image: is a grayscale PIL image object """ diff --git a/computer_vision/otsu_threshold.py b/computer_vision/otsu_threshold.py index 8485d80d6f46..983fe060bce7 100644 --- a/computer_vision/otsu_threshold.py +++ b/computer_vision/otsu_threshold.py @@ -7,7 +7,7 @@ """ -def otsu_threshold(image: Image) -> Image.Image: +def otsu_threshold(image: Image.Image) -> Image.Image: """ Applies Otsu's thresholding method to a grayscale image. diff --git a/digital_image_processing/change_brightness.py b/digital_image_processing/change_brightness.py index bb409b73dfaa..b6ebcc9371c6 100644 --- a/digital_image_processing/change_brightness.py +++ b/digital_image_processing/change_brightness.py @@ -1,7 +1,7 @@ from PIL import Image -def change_brightness(img: Image, level: float) -> Image.Image: +def change_brightness(img: Image.Image, level: float) -> Image.Image: """ Change the brightness of a PIL Image to a given level. diff --git a/digital_image_processing/change_contrast.py b/digital_image_processing/change_contrast.py index a88dacb4b732..80ed53de6308 100644 --- a/digital_image_processing/change_contrast.py +++ b/digital_image_processing/change_contrast.py @@ -11,7 +11,7 @@ from PIL import Image -def change_contrast(img: Image, level: int) -> Image.Image: +def change_contrast(img: Image.Image, level: int) -> Image.Image: """ Function to change contrast """