RemoveUnusedImports codemod incorrectly removes this
Open
bug
codemod
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 229
- PR merge metrics
- No merged PRs in 30d
Description
```
class X:
import random
a = [random.lol for _ in ()]
```
`random` here is used by the class body, but gets removed by the codemod. This might be because ScopeProvider doesn't connect the access in the list comprehension with the class-local import.
Contributor guide
Assessment
This issue has not been assessed yet.