Skip to content
This repository was archived by the owner on Nov 2, 2025. It is now read-only.

Commit 0b6fe29

Browse files
pqnCopybara Bot
andauthored
Project import generated by Copybara. (#15)
GitOrigin-RevId: f7e16b7c25c9616283dd0c5df68c4b97b85498cd Co-authored-by: Copybara Bot <[email protected]>
1 parent 22f6c58 commit 0b6fe29

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Most captures also include documentation as `@doc`. `@definition.function` and `
8484
| `@definition.type` | N/A || N/A || N/A |||
8585
| `@definition.constant` ||||||||
8686
| `@definition.enum` ||||||||
87-
| `@definition.import` | |||||| N/A |
87+
| `@definition.import` | |||||| N/A |
8888
| `@definition.include` | N/A | N/A | N/A | N/A | N/A |||
8989
| `@definition.package` | N/A | N/A | N/A ||| N/A | N/A |
9090
| `@reference.call` ||||||||

queries/python_imports.scm

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
;; Import info
22
(import_statement
3-
name:
4-
([
5-
(dotted_name) @import.default @import.namespace @name
6-
(aliased_import
7-
name: (dotted_name) @import.default @name
8-
alias: (identifier) @import.namespace
9-
)
10-
]@definition.import)
11-
)
3+
name: [
4+
(dotted_name) @import.default @import.namespace @name
5+
(aliased_import
6+
name: (dotted_name) @import.default @name
7+
alias: (identifier) @import.namespace)
8+
]) @definition.import
129

1310
(import_from_statement
14-
module_name: ([
15-
(dotted_name) @import.default @name
16-
(relative_import) @import.default @name
17-
])
18-
name:
19-
([
20-
(dotted_name) @import.named.source
21-
(aliased_import
22-
name: (dotted_name) @import.named.source
23-
alias: (identifier) @import.named.alias
24-
)
25-
])
26-
) @definition.import
11+
module_name: [
12+
(dotted_name)
13+
(relative_import)
14+
] @import.default @name
15+
name: [
16+
(dotted_name) @import.named.source
17+
(aliased_import
18+
name: (dotted_name) @import.named.source
19+
alias: (identifier) @import.named.alias)
20+
]) @definition.import

0 commit comments

Comments
 (0)