Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[next major] Do not shadow Python standard-library module

Offen
#246 2 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@benoit74 arbeitet bereits daran.

Seit 20.1.2025.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

enhancement

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.

Vorherrschende Sprache
Python
Sterne
31
Forks
27
Ø Merge
3 T. 7 Std.
Gemergte PRs (30 T.)
2

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus openzim/python-scraperlib

Alle Issues in openzim/python-scraperlib

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.