[next major] Do not shadow Python standard-library module
@benoit74 đang làm issue này rồi.
Từ ngày 20/1/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 31
- Fork
- 27
- Merge trung bình
- 3 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openzim/python-scraperlib
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openzim/python-scraperlib#339 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openzim/python-scraperlib#292 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
openzim/python-scraperlib#341 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
openzim/python-scraperlib#340 ·
-
bug
openzim/python-scraperlib#334 · 1 người được giao ·
Tất cả issue của openzim/python-scraperlib
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·