Skip to content
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

[py] extend typing options for get_property() #10682

Closed
wants to merge 1 commit into from

Conversation

eNcacz
Copy link
Contributor

@eNcacz eNcacz commented May 23, 2022

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

  • clientHeight property is returned as int
  • fooBar property is returned as NoneType
  • childNodes property 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

  • 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

  • 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.
  • All new and existing tests passed.

@CLAassistant
Copy link

CLAassistant commented May 23, 2022

CLA assistant check
All committers have signed the CLA.

@diemol diemol added the C-py label May 23, 2022
@titusfortner titusfortner added this to the 4.3 milestone May 24, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 26, 2022

Codecov Report

Merging #10682 (0e2dd11) into trunk (9a43c53) will not change coverage.
The diff coverage is 0.00%.

❗ 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 data
Powered by Codecov. Last update 9a43c53...68c7aa6. Read the comment docs.

@titusfortner
Copy link
Member

@eNcacz looks like we've updated to Python 3 syntax for this, can you update this PR so we can merge it? Thanks!

@diemol diemol modified the milestones: 4.3, 4.5 Aug 15, 2022
@titusfortner titusfortner removed this from the 4.5 milestone Sep 26, 2022
@github-actions github-actions bot added the Stale label Jul 3, 2023
@github-actions github-actions bot closed this Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Wrong type for WebElement.get_property
7 participants