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

[🚀 Feature]: Python upgrade to f-strings [good first issue] #11084

Closed
symonk opened this issue Oct 5, 2022 · 7 comments · Fixed by #11087
Closed

[🚀 Feature]: Python upgrade to f-strings [good first issue] #11084

symonk opened this issue Oct 5, 2022 · 7 comments · Fixed by #11087
Labels
C-py E-easy help wanted Issues looking for contributions I-enhancement

Comments

@symonk
Copy link
Member

symonk commented Oct 5, 2022

Feature and motivation

The python code base shows it's age in a few places. Opening this as a great first issue for new contributors!

The following are violations, take as many as you would like 👍, data is file:lineno:column:

selenium/webdriver/firefox/extension_connection.py:53:15
selenium/webdriver/firefox/extension_connection.py:69:21
selenium/webdriver/firefox/firefox_binary.py:113:20
selenium/webdriver/firefox/firefox_profile.py:198:28
selenium/webdriver/firefox/firefox_profile.py:236:25
selenium/webdriver/firefox/firefox_profile.py:303:26
selenium/webdriver/firefox/firefox_profile.py:327:30
selenium/webdriver/remote/webdriver.py:291:15
selenium/webdriver/remote/webdriver.py:852:20
selenium/webdriver/remote/webdriver.py:855:20
selenium/webdriver/remote/webdriver.py:858:20
selenium/webdriver/remote/webdriver.py:881:20
selenium/webdriver/remote/webdriver.py:884:20
selenium/webdriver/remote/webdriver.py:887:20
selenium/webdriver/remote/webelement.py:77:15
selenium/webdriver/remote/webelement.py:180:12
selenium/webdriver/remote/webelement.py:264:42
selenium/webdriver/remote/webelement.py:425:20
selenium/webdriver/remote/webelement.py:428:20
selenium/webdriver/remote/webelement.py:431:20
selenium/webdriver/remote/remote_connection.py:113:37
selenium/webdriver/remote/remote_connection.py:288:41
selenium/webdriver/remote/shadowroot.py:39:15
selenium/webdriver/remote/shadowroot.py:46:20
selenium/webdriver/remote/shadowroot.py:49:20
selenium/webdriver/remote/shadowroot.py:52:20
selenium/webdriver/remote/shadowroot.py:59:20
selenium/webdriver/remote/shadowroot.py:62:20
selenium/webdriver/remote/shadowroot.py:65:20
selenium/webdriver/remote/errorhandler.py:236:35
selenium/webdriver/common/utils.py:96:15
selenium/webdriver/common/utils.py:97:11
selenium/webdriver/common/utils.py:130:34
selenium/webdriver/common/action_chains.py:364:28
selenium/webdriver/common/bidi/cdp.py:153:15
selenium/webdriver/common/bidi/cdp.py:264:27
selenium/webdriver/common/bidi/cdp.py:443:39
selenium/webdriver/common/actions/pointer_input.py:33:43
selenium/webdriver/support/select.py:38:16
selenium/webdriver/support/select.py:76:14
selenium/webdriver/support/select.py:85:41
selenium/webdriver/support/select.py:101:37
selenium/webdriver/support/select.py:114:16
selenium/webdriver/support/select.py:128:24
selenium/webdriver/support/select.py:138:41
selenium/webdriver/support/select.py:163:14
selenium/webdriver/support/select.py:169:41
selenium/webdriver/support/select.py:186:37
selenium/webdriver/support/select.py:200:16
selenium/webdriver/support/select.py:206:41
selenium/webdriver/support/select.py:223:30
selenium/webdriver/support/select.py:231:19
selenium/webdriver/support/select.py:233:15
selenium/webdriver/support/wait.py:69:15
selenium/webdriver/support/color.py:153:15
selenium/webdriver/support/color.py:157:15
selenium/webdriver/support/color.py:178:15

Usage example

in the example of select.py:163:

old:

css = "option[value = %s]" % self._escape_string(value)

new:

css = f"option[value = {self._escape_string(value)}]"
@symonk symonk added E-easy C-py I-enhancement help wanted Issues looking for contributions labels Oct 5, 2022
@github-actions
Copy link

github-actions bot commented Oct 5, 2022

This issue is looking for contributors.

Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.

@jsa34
Copy link

jsa34 commented Oct 7, 2022

As a tip, I find Sourcery a good tool for these kind of things

@anubhav823
Copy link

If kianelbo is not working on it, can I give it a go?

@symonk
Copy link
Member Author

symonk commented Oct 12, 2022

Thanks @anubhav823 but there is a pull request open for all of it I think, would love some help on additional issues tho!

@anubhav823
Copy link

@symonk Ok. I will try solving other issues

@nnrepos
Copy link

nnrepos commented Oct 13, 2022

@symonk hey, if this is still dependent on someone's PR, can you assign them?
this way it's easy to know which issues are relevant.
thanks 😄

@github-actions
Copy link

github-actions bot commented Jan 7, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-py E-easy help wanted Issues looking for contributions I-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants