You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
2, because the changes are mostly syntax updates and string formatting improvements, which are straightforward to review. The PR is well-documented and the changes are consistent across multiple files.
🧪 Relevant tests
Yes
⚡ Possible issues
Possible Bug: The removal of the file mode "r" in open() calls might not be an issue since it's the default, but it should be confirmed that no binary files are being read, as this could cause unexpected behavior.
Why: This is a valid improvement suggestion as using a context manager for file operations ensures that the file is properly closed even if an error occurs, which is not currently handled in the PR code.
8
Enhancement
Use f-strings for clearer and more efficient string formatting
Replace the string concatenation in the write method with formatted strings for better readability and performance.
Why: The suggestion to use f-strings enhances readability and performance, aligning with modern Python practices. This is a good suggestion, but not critical.
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.
User description
Description
Filter all python code over
pupgrade --py38-plus
.Motivation and Context
Make code cleaner.
Types of changes
Checklist
PR Type
enhancement
Description
format
method for string formatting across various scripts and modules.Changes walkthrough 📝
convert_protocol_to_json.py
Simplify file opening in convert_protocol_to_json.py
common/devtools/convert_protocol_to_json.py
open
function to use the default mode.pdl.py
Code modernization in pdl.py
common/devtools/pdl.py
gen_file.py
Refactor string formatting and file handling in gen_file.py
javascript/private/gen_file.py
webelement.py
Update type hints in webelement.py
py/selenium/webdriver/remote/webelement.py
List
tolist
for Python 3.9+compatibility.
remote_downloads_tests.py
Simplify file opening in remote_downloads_tests.py
py/test/selenium/webdriver/remote/remote_downloads_tests.py
open
function to use the default mode.pinned_browsers.py
Refactor string formatting in pinned_browsers.py
scripts/pinned_browsers.py
update_copyright.py
Simplify file opening in update_copyright.py
scripts/update_copyright.py