This repository was archived by the owner on Jul 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
This repository was archived by the owner on Jul 17, 2026. It is now read-only.
Codegen struggling to recognize module atrtribute access as a usage #242
Open
Description
When using codegen to remove dead code, it incorrectly identifies functions accessed via module attribute notation as unused.
Example:
file: example.py
from a.b import module
module.some_func() # this usage is not detected
In the dead code script:
some_func.usages # Returns []
some_func.call_sites # Returns []
some_func.symbol_usages # Returns []
As a result, some_func is incorrectly identified as dead code and removed, despite being actively used through module attribute access.
Expected Behavior:
some_funcshould show usage when accessed viamodule.some_func()