diff --git a/computer_vision/mean_threshold.py b/computer_vision/mean_threshold.py index 76657933d6a9..47f9ebcb063b 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: """ image: is a grayscale PIL image object """ diff --git a/computer_vision/otsu_threshold.py b/computer_vision/otsu_threshold.py index 7e9003789339..983fe060bce7 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.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..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: +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 7e49694708f8..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: +def change_contrast(img: Image.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"