Summary
Discovered when running ruff on aioitertools, which reimplements several builtins as async-compatible variants, where UP029 incorrectly flags imports from the local .builtins module as unnecessary imports:
amethyst@espeon ~/workspace/aioitertools ruff+ » cat foo.py
from .builtins import next
amethyst@espeon ~/workspace/aioitertools ruff+ » uv run ruff check --isolated --select UP029 foo.py
UP029 Unnecessary builtin import: `next`
--> foo.py:1:1
|
1 | from .builtins import next
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: Remove unnecessary builtin import
Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
> [1]
Version
ruff 0.14.3