Title: [next major] Do not shadow Python standard-library module · Issue #246 · openzim/python-scraperlib · GitHub
Open Graph Title: [next major] Do not shadow Python standard-library module · Issue #246 · openzim/python-scraperlib
X Title: [next major] Do not shadow Python standard-library module · Issue #246 · openzim/python-scraperlib
Description: Ruff / Flake8 has a new rule A005: https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/ It is recommended to not shadow Python standard-library modules. Currently, we have 5 issues: src/zimscraperlib/html.py:1:1: A005 Module `html`...
Open Graph Description: Ruff / Flake8 has a new rule A005: https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/ It is recommended to not shadow Python standard-library modules. Currently, we have 5 issues: src/zimsc...
X Description: Ruff / Flake8 has a new rule A005: https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/ It is recommended to not shadow Python standard-library modules. Currently, we have 5 issues: src/zimsc...
Opengraph URL: https://github.com/openzim/python-scraperlib/issues/246
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[next major] Do not shadow Python standard-library module","articleBody":"Ruff / Flake8 has a new rule `A005`: https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/\n\nIt is recommended to not shadow Python standard-library modules.\n\nCurrently, we have 5 issues:\n\n```\nsrc/zimscraperlib/html.py:1:1: A005 Module `html` shadows a Python standard-library module\nsrc/zimscraperlib/logging.py:1:1: A005 Module `logging` shadows a Python standard-library module\nsrc/zimscraperlib/rewriting/html.py:1:1: A005 Module `html` shadows a Python standard-library module\nsrc/zimscraperlib/types.py:1:1: A005 Module `types` shadows a Python standard-library module\nsrc/zimscraperlib/typing.py:1:1: A005 Module `typing` shadows a Python standard-library module\n```\n\nFor now, I've disabled the rule `A005` in https://github.com/openzim/python-scraperlib/pull/245 but we need to make a finer decision.\n\nI think that `logging` module is shadowing \"on-purpose\" and might be allowed. Others could be considered for renaming. But I don't have very good suggestions of names, so I'm not 100% convinced, if we end-up with bad names, I'm not sure it really ease maintenance at all.","author":{"url":"https://github.com/benoit74","@type":"Person","name":"benoit74"},"datePublished":"2025-01-20T08:16:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/246/python-scraperlib/issues/246"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b68d7567-ed13-35d2-d795-a76354a29cd7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E54:38B840:53899B:6BEF3F:698EAB9C |
| html-safe-nonce | 16995ff47a1a7939ca6bde61d60a925017732dcad2438ac47f943756b5e0964f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTU0OjM4Qjg0MDo1Mzg5OUI6NkJFRjNGOjY5OEVBQjlDIiwidmlzaXRvcl9pZCI6IjQ4NzkxMTE2OTA3MzIzNTAzNjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b2af22242a5433eab9f305e29c4aeaaf2ae11bd8a3f8d619155b3067776ddac6 |
| hovercard-subject-tag | issue:2798532770 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openzim/python-scraperlib/246/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68bb4f7c4351e5b04fdbf7228f896d26692218214679d03436210b3aade4ae3c/openzim/python-scraperlib/issues/246 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68bb4f7c4351e5b04fdbf7228f896d26692218214679d03436210b3aade4ae3c/openzim/python-scraperlib/issues/246 |
| og:image:alt | Ruff / Flake8 has a new rule A005: https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/ It is recommended to not shadow Python standard-library modules. Currently, we have 5 issues: src/zimsc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | benoit74 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| go-import | github.com/openzim/python-scraperlib git https://github.com/openzim/python-scraperlib.git |
| octolytics-dimension-user_id | 26540839 |
| octolytics-dimension-user_login | openzim |
| octolytics-dimension-repository_id | 237924365 |
| octolytics-dimension-repository_nwo | openzim/python-scraperlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 237924365 |
| octolytics-dimension-repository_network_root_nwo | openzim/python-scraperlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width