-
Notifications
You must be signed in to change notification settings - Fork 513
Open
Description
Request
I would be nice to have expanded type coverage.
History
- Selenium added typings in 4.1.2 in 2022-02-24
- typeshed: removed selenium types around this time:
- As of 0.20.1, splinter is partially typed.
Example scenario
Loosely, even if this isn't idiomatic splinter usage, I think the general benefits of annotations and typings still hold. I am fine to elaborate.
Specifically, I am running into any Any with BaseWebDriver's attribute .driver.
Where I have a function like:
def fill_helper(browser: BaseWebDriver, selectors_path: list[str], value: str) -> None:
# ...
passAnd mypy will raise:
.../test_website.py:31: error: Argument 1 to "fill_helper" becomes "Any" due to an unfollowed import [no-any-unimported]
- Selenium: 4.16.1
- Splinter: 0.20.1
Not relevant, but happen to be using:
- pytest: 7.4.3
- pytest-splinter: 3.3.2
Metadata
Metadata
Assignees
Labels
No labels