-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
bugSomething isn't workingSomething isn't workingneeds-decisionAwaiting a decision from a maintainerAwaiting a decision from a maintainer
Description
False negative
import importlib # this package is unused, but not detected
import importlib.util
package = "ruff"
is_present = importlib.util.find_spec(package)
When from importlib import util is used, correct behaviour is observed
import importlib # this package is unused, and detected
from importlib import util
package = "ruff"
is_present = util.find_spec(package)
Ruff 'v0.0.270'
(hope I'm overlooking some submodule complexity in the general case, but it seems that in this specific case import importlib can be safely removed)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds-decisionAwaiting a decision from a maintainerAwaiting a decision from a maintainer