html: replace deprecated codecs.open with builtin open#6289
html: replace deprecated codecs.open with builtin open#6289harvey0100 wants to merge 1 commit intoavocado-framework:masterfrom
Conversation
codecs.open() is deprecated in favor of the builtin open() with an encoding parameter. This triggers pylint W4902 (deprecated-method) which causes the pre-commit pylint hook to fail for all commits since the check-lint script lints the entire repo. Assisted-By: Cursor-Claude-4-Sonnet Signed-off-by: Harvey Lynden <hlynden@redhat.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request modernizes the file input/output operations within the HTML plugin by migrating from the deprecated Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly replaces the deprecated codecs.open() with the built-in open() function, specifying the encoding as a keyword argument. The changes are straightforward and correctly applied, removing an unnecessary dependency on the codecs module for this purpose and resolving a pylint warning. The implementation is sound and there are no issues with the changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6289 +/- ##
==========================================
- Coverage 73.67% 73.67% -0.01%
==========================================
Files 206 206
Lines 22634 22633 -1
==========================================
- Hits 16676 16674 -2
- Misses 5958 5959 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
codecs.open() is deprecated in favor of the builtin open() with an encoding parameter. This triggers pylint W4902 (deprecated-method) which causes the pre-commit pylint hook to fail for all commits since the check-lint script lints the entire repo.