from module import * binds names that the file does not list
What it finds
A star import binds every public name of the module, so a reader cannot see where a name comes from, a later version of the module can shadow names of the file, and tools cannot tell unused or undefined names apart. __init__.py files, which often gather the names of their submodules this way, and stubs are not checked.
From the rule's source, unlisted_star_import.rs.
from os.path import *tx0 reports: from os.path import * binds names the file does not listfrom os import path Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/python:unlisted-star-import" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
# tx0: ignore[tx0/python:unlisted-star-import] reason="..."tx0 explain tx0/python:unlisted-star-import shows the same in the terminal. Found a false positive? Report it.