[py] extend typing options for get_property()
fixes #10624
Extend list of types which can be returned byt get_property() method.
Description
Current typing options does not cover all possible types returned by get_property()
For example
-
clientHeightproperty is returned as int -
fooBarproperty is returned as NoneType -
childNodesproperty is returned as list
Motivation and Context
Linters (like mypy or PyCharm) complains about get_property() usage when we expect one of mentioned data type.
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] I have read the contributing document.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
Codecov Report
Merging #10682 (0e2dd11) into trunk (9a43c53) will not change coverage. The diff coverage is
0.00%.
:exclamation: Current head 0e2dd11 differs from pull request most recent head 68c7aa6. Consider uploading reports for the commit 68c7aa6 to get more accurate results
@@ Coverage Diff @@
## trunk #10682 +/- ##
=======================================
Coverage 46.61% 46.61%
=======================================
Files 86 86
Lines 5848 5848
Branches 278 278
=======================================
Hits 2726 2726
Misses 2844 2844
Partials 278 278
| Impacted Files | Coverage Δ | |
|---|---|---|
| py/selenium/webdriver/remote/webelement.py | 32.96% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 9a43c53...68c7aa6. Read the comment docs.
@eNcacz looks like we've updated to Python 3 syntax for this, can you update this PR so we can merge it? Thanks!