Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Dec 16, 2024
1 parent 4bbdec0 commit c1a1ce1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ val Expression.isImported: Pair<Boolean, ImportDeclaration?>
if (name.parent == null) {
// If the name does not have a parent, this reference could directly be the name
// of an import, let's check
imports.firstOrNull { it.name == this.name }
imports.firstOrNull { it.name.lastPartsMatch(name) }
} else {
// Otherwise, the parent name could be the import
imports.firstOrNull { it.name == this.name.parent }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ class PythonFrontendTest : BaseTest() {
val topLevel = Path.of("src", "test", "resources", "python")
val tu =
analyzeAndGetFirstTU(
listOf(topLevel.resolve("import_no_src_test.py").toFile()),
listOf(topLevel.resolve("import_no_src.py").toFile()),
topLevel,
true
) {
Expand Down

0 comments on commit c1a1ce1

Please sign in to comment.