Skip to content

Navigation Menu

Sign in
Sign up
This repository was archived by the owner on Jul 17, 2026. It is now read-only.
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
Labels
bugSomething isn't working

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_func should show usage when accessed via module.some_func()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /