File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 33| 4 | Import | lazy |
44| 5 | Import | lazy |
55| 6 | Import | lazy |
6- | 9 | Import | normal |
6+ | 7 | from l import * | lazy |
77| 10 | Import | normal |
8+ | 11 | Import | normal |
9+ | 12 | from w import * | normal |
Original file line number Diff line number Diff line change 44lazy from d import e as f
55lazy import g .h as i
66lazy from ..j import k
7+ lazy from l import *
78
89# Non-lazy imports
910import x
1011from y import z
12+ from w import *
Original file line number Diff line number Diff line change 11import python
22
3- string lazy ( Import imp ) { if imp .isLazy ( ) then result = "lazy" else result = "normal" }
3+ string lazy ( Stmt s ) {
4+ if s .( Import ) .isLazy ( ) or s .( ImportStar ) .isLazy ( ) then result = "lazy" else result = "normal"
5+ }
46
5- from Import imp
6- where imp .getLocation ( ) .getFile ( ) .getShortName ( ) = "test.py"
7- select imp .getLocation ( ) .getStartLine ( ) , imp .toString ( ) , lazy ( imp )
7+ from Stmt s
8+ where
9+ s .getLocation ( ) .getFile ( ) .getShortName ( ) = "test.py" and
10+ ( s instanceof Import or s instanceof ImportStar )
11+ select s .getLocation ( ) .getStartLine ( ) , s .toString ( ) , lazy ( s )
You can’t perform that action at this time.
0 commit comments