[py] convert Color to use @classmethod alternative constructors#10558
Merged
titusfortner merged 5 commits intoSeleniumHQ:trunkfrom May 9, 2022
Merged
Conversation
AutomatedTester
approved these changes
Apr 28, 2022
Codecov Report
@@ Coverage Diff @@
## trunk #10558 +/- ##
==========================================
+ Coverage 45.02% 45.07% +0.04%
==========================================
Files 85 85
Lines 5508 5513 +5
Branches 268 268
==========================================
+ Hits 2480 2485 +5
Misses 2760 2760
Partials 268 268
Continue to review full report at Codecov.
|
AutomatedTester
approved these changes
Apr 28, 2022
elgatov
pushed a commit
to elgatov/selenium
that referenced
this pull request
Jun 27, 2022
…eleniumHQ#10558) * move color tests to unit; change to classmethod constructors to permit subclassing * remove unnecessary package in support unit tests; fix licensing * fix violations in Co-authored-by: David Burns <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch changes the alternative constructors of the
Colorclass to use the intended@classmethodso theclsis available internally; this allows subclassing without the current static constructors returning instances of the parent class always.. I've moved the color unit tests out ofwebdriver/supportas they are better suited in thetest-unitbazel target I think.The diff here also highlights its a bit of a wild west in terms of linting through
/py/- should we discuss/look at implementing some linting, perhaps https://github.com/psf/black?