Skip to content

Commit a10a1ce

Browse files
Khushi-Tyagi9pre-commit-ci[bot]cclauss
authored
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>
1 parent 6029a91 commit a10a1ce

5 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎computer_vision/mean_threshold.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88

9-
def mean_threshold(image: Image) -> Image:
9+
def mean_threshold(image: Image.Image) -> Image.Image:
1010
"""
1111
image: is a grayscale PIL image object
1212
"""

‎computer_vision/otsu_threshold.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88

99

10-
def otsu_threshold(image: Image) -> Image:
10+
def otsu_threshold(image: Image.Image) -> Image.Image:
1111
"""
1212
Applies Otsu's thresholding method to a grayscale image.
1313

‎digital_image_processing/change_brightness.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from PIL import Image
22

33

4-
def change_brightness(img: Image, level: float) -> Image:
4+
def change_brightness(img: Image.Image, level: float) -> Image.Image:
55
"""
66
Change the brightness of a PIL Image to a given level.
77

‎digital_image_processing/change_contrast.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from PIL import Image
1212

1313

14-
def change_contrast(img: Image, level: int) -> Image:
14+
def change_contrast(img: Image.Image, level: int) -> Image.Image:
1515
"""
1616
Function to change contrast
1717
"""

‎pyproject.toml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ rules.deprecated = "ignore"
206206
rules.invalid-argument-type = "ignore"
207207
rules.invalid-return-type = "ignore"
208208
rules.invalid-type-arguments = "ignore"
209-
rules.invalid-type-form = "ignore"
210209
rules.no-matching-overload = "ignore"
211210
rules.not-iterable = "ignore"
212211
rules.not-subscriptable = "ignore"

0 commit comments

Comments
 (0)