Repository navigation
Do not shadow Python standard-library modules (#246) - #415
Open
Sriram-Nambiar wants to merge 1 commit into
Open
Sriram-Nambiar wants to merge 1 commit into
Sriram-Nambiar wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Closes #246
Overview
Renames internal modules that shadowed Python standard-library module names (
html,types,typing,logging,rewriting/html), and re-enables Ruff ruleA005inpyproject.toml.As Per the plan outlined in #246, this is a breaking change intended for the next major release, so no backward-compatibility shims or re-exports are provided.
Renamed Modules
All files were renamed with
git mvto preserve git commit history:zimscraperlib/html.pyzimscraperlib/html_parsing.pyfind_title_in,find_language_in)zimscraperlib/types.pyzimscraperlib/content_types.pyzimscraperlib/typing.pyzimscraperlib/custom_types.pyzimscraperlib/logging.pyzimscraperlib/log_setup.pygetLogger)zimscraperlib/rewriting/html.pyzimscraperlib/rewriting/html_rewriting.pyhtml)zimscraperlib/rewriting/js.pyzimscraperlib/rewriting/js_rewriting.pyhtml_rewritingzimscraperlib/rewriting/css.pyzimscraperlib/rewriting/css_rewriting.pyhtml_rewritingKey Changes
src/zimscraperlib/(includingzimscraperlib/__init__.py).tests/html_parsing/,tests/content_types/,tests/custom_types/,tests/log_setup/,tests/rewriting/) and updated test imports."A005"from[tool.ruff.lint] ignoreinpyproject.toml.## [Unreleased] -> ### ChangedinCHANGELOG.mdreferencing [next major] Do not shadow Python standard-library module #246.Verification
hatch -e qa run check-type(pyright) ➔ Passed (0 errors, 0 warnings)