mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
PY-16055 Add quickfix and tests for functions with incorrect return annotation
Add quickfix for functions whose return type doesn't match their annotated type.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
def f(x):
|
||||
# type: (int) -> str
|
||||
return <warning descr="Expected type 'str', got 'int' instead">42<caret></warning>
|
||||
@@ -0,0 +1,3 @@
|
||||
def f(x):
|
||||
# type: (int) -> int
|
||||
return 42
|
||||
@@ -0,0 +1,2 @@
|
||||
def f(x) -> str:
|
||||
return <warning descr="Expected type 'str', got 'int' instead">42<caret></warning>
|
||||
@@ -0,0 +1,2 @@
|
||||
def f(x) -> int:
|
||||
return 42
|
||||
Reference in New Issue
Block a user