Update various comments now non-types dependencies are allowed (#9527)

This commit is contained in:
Avasam
2023-01-14 08:20:04 -05:00
committed by GitHub
parent cd56735bf0
commit 1a9aa3f3fe
9 changed files with 19 additions and 16 deletions
+6 -1
View File
@@ -9,8 +9,12 @@ from PIL import Image
_Unused: TypeAlias = object
_P = ParamSpec("_P")
_R = TypeVar("_R")
# TODO: cv2.Mat is not available as a type yet: https://github.com/microsoft/python-type-stubs/issues/211
# TODO: cv2.Mat is not available as a type yet:
# https://github.com/microsoft/python-type-stubs/issues/211
# https://github.com/microsoft/python-type-stubs/tree/main/cv2
# https://github.com/opencv/opencv/pull/20370
# cv2.Mat is just an alias for a numpy NDArray, but can't import that either.
# Because pyscreeze does not declare it as a dependency, stub_uploader won't let it.
_Mat: TypeAlias = Incomplete
useOpenCV: bool
@@ -37,6 +41,7 @@ class RGB(NamedTuple):
class PyScreezeException(Exception): ...
class ImageNotFoundException(PyScreezeException): ...
# _locateAll_opencv
def requiresPillow(wrappedFunction: Callable[_P, _R]) -> Callable[_P, _R]: ...
@overload
def locate(