Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a7c0ec

Browse files
committed
Add multiline test
1 parent b835494 commit 5a7c0ec

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

test-data/unit/check-columns.test

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,23 @@ def f_untyped(x, foo, *args, **kwargs) -> None:
234234
main:5:1:5:43: error: Function is missing a type annotation for one or more arguments
235235
main:8:1:8:47: error: Function is missing a type annotation for one or more arguments
236236

237+
[case testColumnEndMultiline]
238+
# flags: --disallow-untyped-defs --warn-no-return --show-error-end
239+
def f(
240+
x: int,
241+
y: int,
242+
):
243+
pass
244+
245+
def g(
246+
x: int,
247+
y: int,
248+
) -> int:
249+
x = 1
250+
[out]
251+
main:2:1:4:11: error: Function is missing a return type annotation
252+
main:8:1:11:9: error: Missing return statement
253+
237254
[case testColumnNameIsNotDefined]
238255
((x)) # E:3: Name "x" is not defined
239256

0 commit comments

Comments
 (0)