ty: un-ignore invalid-type-form (#15387)

* ty: un-ignore invalid-type-form

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply batched suggestions from code review

Co-authored-by: Christian Clauss <cclauss@me.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Khushi Tyagi
2026-09-21 12:30:25 +02:00
committed by GitHub
co-authored by Christian Clauss pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent 6029a918e5
commit a10a1ce2cd
5 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ https://en.wikipedia.org/wiki/Thresholding_(image_processing)
"""
def mean_threshold(image: Image) -> Image:
def mean_threshold(image: Image.Image) -> Image.Image:
"""
image: is a grayscale PIL image object
"""
+1 -1
View File
@@ -7,7 +7,7 @@ https://en.wikipedia.org/wiki/Otsu%27s_method
"""
def otsu_threshold(image: Image) -> Image:
def otsu_threshold(image: Image.Image) -> Image.Image:
"""
Applies Otsu's thresholding method to a grayscale image.
@@ -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.
+1 -1
View File
@@ -11,7 +11,7 @@ ruff : True
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
"""
-1
View File
@@ -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"