Skip to content

Conversation

@lizard-boy
Copy link

Summary

Creating a RemoveUnusedImports transformer according to the docs does not properly handle the __all__ variable.

Test Plan

I added a test to libcst/metadata/tests/test_scope_provider.py that ensures the imports have references that target the strings in __all__.

vantaboard and others added 4 commits April 4, 2024 11:32
Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants