Skip to content

wrong import relationship in table edges #2409

Closed

Description

@wuwu1985

1.the screenshot of wrong data in table edges

Image

2.import script from source file is below:
import logging

the logging import is not from the target :file:app/core/logging.py,it's from the standard library.

Activity

  1. maxmilian commented on Oct 8, 2026

    @maxmilian
    Contributor

    Reproduced on current main (b635dd4): for an absolute Python import, findPythonModuleFile in src/resolution/import-resolver.ts matches any project file whose path ends with the module path, so stdlib import logging binds to app/core/logging.py whenever such a file exists. This looks like exactly the case open PR #1921 addresses ("could bind import json to a project serializers/json.py"); it resolves absolute imports only from evidence-based package roots instead of a filename-suffix match. Linking so the two are tracked together.

  2. colbymchenry commented on Oct 22, 2026

    @colbymchenry
    Owner

    Thanks for the report! This is fixed on main by #1921, which resolves Python imports from your project's own package roots the way Python finds modules, so import logging stays the standard library even when the project has an app/core/logging.py. We checked it with that layout: v1.6.2 linked import logging to app/core/logging.py (and logging.getLogger(...) to a same-named function in it), while current main links neither, after a fresh index or a sync. The fix is on main and ships in the next release after 1.6.2; re-index your project after upgrading.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions