File tree Expand file tree Collapse file tree 4 files changed +1
-46
lines changed
testdata/resolve_deps_relative_imports/package2 Expand file tree Collapse file tree 4 files changed +1
-46
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ func (p *FileParser) parseImportStatements(node *sitter.Node) bool {
165165 }
166166 } else if node .Type () == sitterNodeTypeImportFromStatement {
167167 from := node .Child (1 ).Content (p .code )
168- // If the import is from the current package, we don't need to add it to the modules.
168+ // If the import is from the current package, we don't need to add it to the modules i.e. from . import Class1 .
169169 // If the import is from a different relative package i.e. from .package1 import foo, we need to add it to the modules.
170170 if from == "." {
171171 return true
Original file line number Diff line number Diff line change 1- # Copyright 2023 The Bazel Authors. All rights reserved.
2- #
3- # Licensed under the Apache License, Version 2.0 (the "License");
4- # you may not use this file except in compliance with the License.
5- # You may obtain a copy of the License at
6- #
7- # http://www.apache.org/licenses/LICENSE-2.0
8- #
9- # Unless required by applicable law or agreed to in writing, software
10- # distributed under the License is distributed on an "AS IS" BASIS,
11- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12- # See the License for the specific language governing permissions and
13- # limitations under the License.
14-
15-
161def add (a , b ):
172 return a + b
183
Original file line number Diff line number Diff line change 1- # Copyright 2023 The Bazel Authors. All rights reserved.
2- #
3- # Licensed under the Apache License, Version 2.0 (the "License");
4- # you may not use this file except in compliance with the License.
5- # You may obtain a copy of the License at
6- #
7- # http://www.apache.org/licenses/LICENSE-2.0
8- #
9- # Unless required by applicable law or agreed to in writing, software
10- # distributed under the License is distributed on an "AS IS" BASIS,
11- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12- # See the License for the specific language governing permissions and
13- # limitations under the License.
14-
15-
161from .library import function5
172
183
Original file line number Diff line number Diff line change 1- # Copyright 2023 The Bazel Authors. All rights reserved.
2- #
3- # Licensed under the Apache License, Version 2.0 (the "License");
4- # you may not use this file except in compliance with the License.
5- # You may obtain a copy of the License at
6- #
7- # http://www.apache.org/licenses/LICENSE-2.0
8- #
9- # Unless required by applicable law or agreed to in writing, software
10- # distributed under the License is distributed on an "AS IS" BASIS,
11- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12- # See the License for the specific language governing permissions and
13- # limitations under the License.
14-
15-
161def function4 ():
172 return "function4"
You can’t perform that action at this time.
0 commit comments