Skip to content

pyscreeze.locateCenterOnScreen should not require minSearchTime parameter #13851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
brasswood opened this issue Apr 18, 2025 · 1 comment · May be fixed by #13852
Open

pyscreeze.locateCenterOnScreen should not require minSearchTime parameter #13851

brasswood opened this issue Apr 18, 2025 · 1 comment · May be fixed by #13852
Labels
stubs: false positive Type checkers report false errors

Comments

@brasswood
Copy link

I have a call of the following form:

pyscreeze.locateCenterOnScreen("example.png")

And I get the following type error:

error: No overload variant of "locateCenterOnScreen" matches argument type "str"  [call-overload]
note: Possible overload variants:
note:     def locateCenterOnScreen(image: str | Image | Any, *, minSearchTime: float, grayscale: bool | None = ..., limit: object = ..., region: tuple[int, int, int, int] | None = ..., step: int = ..., confidence: str | Buffer | SupportsFloat | SupportsIndex = ...) -> Point | None
note:     def locateCenterOnScreen(image: str | Image, *, minSearchTime: float, grayscale: bool | None = ..., limit: object = ..., region: tuple[int, int, int, int] | None = ..., step: int = ..., confidence: None = ...) -> Point | None

However, this is intended to be valid usage of the function, and when I actually run the script, it works fine. I'm guessing that the type of minSearchTime should be float | None.

@brasswood brasswood linked a pull request Apr 18, 2025 that will close this issue
@Avasam
Copy link
Collaborator

Avasam commented Apr 20, 2025

Indeed, minSearchTime defaults to 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: false positive Type checkers report false errors
Projects
None yet
2 participants