mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-28 04:22:21 +08:00
Use ConvertibleToInt/ConvertibleToFloat in many third-party stubs (#11022)
Note: this may make the latest version of certain stubs packages incompatible with older versions of mypy and pyright.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
from _typeshed import Incomplete, ReadableBuffer, StrOrBytesPath, Unused
|
||||
from _typeshed import ConvertibleToFloat, Incomplete, StrOrBytesPath, Unused
|
||||
from collections.abc import Callable, Generator
|
||||
from typing import NamedTuple, SupportsFloat, TypeVar, overload
|
||||
from typing_extensions import Final, ParamSpec, SupportsIndex, TypeAlias
|
||||
from typing import NamedTuple, TypeVar, overload
|
||||
from typing_extensions import Final, ParamSpec, TypeAlias
|
||||
|
||||
from PIL import Image
|
||||
|
||||
@@ -56,7 +56,7 @@ def locate(
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str | ReadableBuffer = 0.999,
|
||||
confidence: ConvertibleToFloat = 0.999,
|
||||
) -> Box | None: ...
|
||||
|
||||
# _locateAll_pillow
|
||||
@@ -82,7 +82,7 @@ def locateOnScreen(
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str | ReadableBuffer = 0.999,
|
||||
confidence: ConvertibleToFloat = 0.999,
|
||||
) -> Box | None: ...
|
||||
|
||||
# _locateAll_pillow
|
||||
@@ -107,7 +107,7 @@ def locateAllOnScreen(
|
||||
limit: int = 1000,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str | ReadableBuffer = 0.999,
|
||||
confidence: ConvertibleToFloat = 0.999,
|
||||
) -> Generator[Box, None, None]: ...
|
||||
|
||||
# _locateAll_pillow
|
||||
@@ -132,7 +132,7 @@ def locateCenterOnScreen(
|
||||
limit: Unused = 1,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str | ReadableBuffer = 0.999,
|
||||
confidence: ConvertibleToFloat = 0.999,
|
||||
) -> Point | None: ...
|
||||
|
||||
# _locateAll_pillow
|
||||
@@ -159,7 +159,7 @@ def locateOnWindow(
|
||||
grayscale: bool | None = None,
|
||||
limit: Unused = 1,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str | ReadableBuffer = 0.999,
|
||||
confidence: ConvertibleToFloat = 0.999,
|
||||
) -> Box | None: ...
|
||||
|
||||
# _locateAll_pillow
|
||||
@@ -201,7 +201,7 @@ def locateAll(
|
||||
limit: int = 1000,
|
||||
region: tuple[int, int, int, int] | None = None,
|
||||
step: int = 1,
|
||||
confidence: SupportsFloat | SupportsIndex | str | ReadableBuffer = 0.999,
|
||||
confidence: ConvertibleToFloat = 0.999,
|
||||
) -> Generator[Box, None, None]: ...
|
||||
|
||||
# _locateAll_pillow
|
||||
|
||||
Reference in New Issue
Block a user