-
Notifications
You must be signed in to change notification settings - Fork 765
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
stubs are completely broken #1919
Comments
The v6.6.1 stub file was just regenerated as part of the release. I might have messed them up some how. I do recall I was switching between Python 3.12 and an earlier version as to implement and test 3.12 support. Will take a look today. One can regenerate it using the |
i don't think the stub file is even needed anymore since the source code now contains type annotations |
It is needed, when using SL from Python side, IDE doesn’t know what public API is. |
I think I built some custom parsing, which is not good idea. It might be better to scrap that logic and use MyPy to generate base for the pyi file. It will need some code for finding correct methods and compile it into single file |
That's probably because a |
it looks like whatever is being used to generate the stubs is completely broken. for example the type annotations in
SeleniumLibrary/__init__.pyi
are mostly invalid:Optional[Optional]
isn't valid. the correct usage would be something likeOptional[int]
(thoughOptional
is deprecated in favor of the new union syntax eg.int | None
)Union
is not valid as a type on its own. it should be something likeUnion[int, str]
(which is deprecated in favor ofint | str
)__init__.py
contains type annotations, so the generated stubs should not be needed and can probably just be deletedpy.typed
file is also required for type checkers to treat the package as typedThe text was updated successfully, but these errors were encountered: