Add some additional tests for relative imports
This commit is contained in:
@@ -12,6 +12,13 @@ def f():
|
||||
x: Literal["foo"]
|
||||
|
||||
|
||||
def f():
|
||||
from . import typical
|
||||
|
||||
# OK
|
||||
x: typical.Literal["foo"]
|
||||
|
||||
|
||||
def f():
|
||||
from .atypical import Literal
|
||||
|
||||
|
||||
@@ -12,6 +12,13 @@ def f():
|
||||
x: Literal["foo"]
|
||||
|
||||
|
||||
def f():
|
||||
from .. import typical
|
||||
|
||||
# OK
|
||||
x: typical.Literal["foo"]
|
||||
|
||||
|
||||
def f():
|
||||
from .typical import Literal
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ expression: diagnostics
|
||||
UndefinedName:
|
||||
name: foo
|
||||
location:
|
||||
row: 19
|
||||
row: 26
|
||||
column: 15
|
||||
end_location:
|
||||
row: 19
|
||||
row: 26
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
@@ -17,10 +17,10 @@ expression: diagnostics
|
||||
UndefinedName:
|
||||
name: foo
|
||||
location:
|
||||
row: 26
|
||||
row: 33
|
||||
column: 15
|
||||
end_location:
|
||||
row: 26
|
||||
row: 33
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
@@ -6,10 +6,10 @@ expression: diagnostics
|
||||
UndefinedName:
|
||||
name: foo
|
||||
location:
|
||||
row: 19
|
||||
row: 26
|
||||
column: 15
|
||||
end_location:
|
||||
row: 19
|
||||
row: 26
|
||||
column: 20
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
Reference in New Issue
Block a user