[next major] Do not shadow Python standard-library module
@benoit74 已經在處理了。
開始於 2025年1月20日。
評估
這個 Issue 還沒有評估資料。
描述
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` shadows a Python standard-library module
src/zimscraperlib/logging.py:1:1: A005 Module `logging` shadows a Python standard-library module
src/zimscraperlib/rewriting/html.py:1:1: A005 Module `html` shadows a Python standard-library module
src/zimscraperlib/types.py:1:1: A005 Module `types` shadows a Python standard-library module
src/zimscraperlib/typing.py:1:1: A005 Module `typing` shadows a Python standard-library module
For now, I've disabled the rule A005 in https://github.com/openzim/python-scraperlib/pull/245 but we need to make a finer decision.
I 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.
- 主要語言
- Python
- 星號
- 31
- 分支
- 31
- 平均合併
- 2 天 5 小時
- 30 天內合併 PR
- 3
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
openzim/python-scraperlib 的其他 Issue
-
HTML rewriting: also rewrite `poster` attribute可能已有人在做 @anshuman83-40 於 2 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
openzim/python-scraperlib#339 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
openzim/python-scraperlib#292 ·
-
難度 3/5 1-2 天 新手友好度 68/100
openzim/python-scraperlib#346 ·
-
URL normalisation: do not rewrite consecutive slashes `//` as a single slash `/`可能已有人在做 @anshuman83-40 於 8 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 45/100
openzim/python-scraperlib#340 ·
-
Add fuzzy rule to rewrite URLs of lesbases.anct.gouv.fr可能重新可做 @benoit74 於 52 天前認領,目前沒有進行中的 PR。 未關閉
openzim/python-scraperlib#334 · 已指派 1 人 ·
查看 openzim/python-scraperlib 的全部 Issue
相似的 Issue
-
難度 1/5 1-3 小時 新手友好度 88/100
gradio-app/gradio#13964 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
jbacalso24/mimry#123 ·
維護者通常 1 天內回覆
-
p:3-mid pydanty:bug pydanty:is-working
難度 2/5 1-3 小時 新手友好度 76/100
pydantic/pydantic-ai#10153 · 1 則留言 ·
維護者通常 1 天內回覆
-
good first issue priority: medium size: S testing
難度 2/5 1-3 小時 新手友好度 85/100
cubrid-lab/cubrid-cookbook-python#316 ·
維護者通常 1 天內回覆