Add xml.__all__, remove import not existing at runtime (#13048)

This commit is contained in:
Stephen Morton
2024-11-20 04:56:44 -08:00
committed by GitHub
parent 921c65304e
commit 971f0c64c6
2 changed files with 5 additions and 1 deletions

View File

@@ -1 +1,3 @@
from xml import parsers as parsers
# At runtime, listing submodules in __all__ without them being imported is
# valid, and causes them to be included in a star import. See #6523
__all__ = ["dom", "parsers", "sax", "etree"] # noqa: F822 # pyright: ignore[reportUnsupportedDunderAll]