Skip to content

Handling imports from sibling modules - #1027

Merged
f0rmiga merged 1 commit into
bazel-contrib:mainfrom
linzhp:sibling
Jan 28, 2023
Merged

Handling imports from sibling modules#1027
f0rmiga merged 1 commit into
bazel-contrib:mainfrom
linzhp:sibling

Conversation

@linzhp

@linzhp linzhp commented Jan 28, 2023

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

When a Python module imports another one in the same package, it can use the file name without the directory names. When Gazelle generate the targets, they are either in the same target or in sibling targets already depending on each other. However, Gazelle still tries to resolve them, even though no dependency resolution is needed

What is the new behavior?

Identify imports in sibling modules and ignore them.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@linzhp
linzhp requested a review from f0rmiga as a code owner January 28, 2023 04:39
@f0rmiga

f0rmiga commented Jan 28, 2023

Copy link
Copy Markdown
Member

Thanks! This was on my TODO list. I'm glad you got it solved!

@linzhp

linzhp commented Jan 28, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for fast review!

@f0rmiga
f0rmiga merged commit 82c8f0a into bazel-contrib:main Jan 28, 2023
@linzhp
linzhp deleted the sibling branch January 28, 2023 04:46
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.

2 participants