Zum Inhalt springen

Broad wildcard import (ARCH2192)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key python.quality.wildcard-import · Severity warning · Category quality

from module import * pollutes the namespace, hides which name comes from where, and causes silent name collisions. Import only what you need.

from os.path import *
p = join("a", "b")
from os.path import join
p = join("a", "b")

Import only the names you use explicitly and drop the wildcard.