Skip to content

Commit

Permalink
Add multiline test
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoettle committed May 9, 2024
1 parent b835494 commit 5a7c0ec
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test-data/unit/check-columns.test
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,23 @@ def f_untyped(x, foo, *args, **kwargs) -> None:
main:5:1:5:43: error: Function is missing a type annotation for one or more arguments
main:8:1:8:47: error: Function is missing a type annotation for one or more arguments

[case testColumnEndMultiline]
# flags: --disallow-untyped-defs --warn-no-return --show-error-end
def f(
x: int,
y: int,
):
pass

def g(
x: int,
y: int,
) -> int:
x = 1
[out]
main:2:1:4:11: error: Function is missing a return type annotation
main:8:1:11:9: error: Missing return statement

[case testColumnNameIsNotDefined]
((x)) # E:3: Name "x" is not defined

Expand Down

0 comments on commit 5a7c0ec

Please sign in to comment.