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

Skip to content
Next Next commit
Add test for line and column end for missing function type annotation
  • Loading branch information
mschoettle committed Mar 9, 2024
commit 5f88e5ddf5601ddc263a739ea93ed2bf2c5430b6
12 changes: 12 additions & 0 deletions test-data/unit/check-columns.test
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,18 @@ if int():
def g(x): # E:5: Function is missing a type annotation
pass

[case testColumnEndFunctionMissingTypeAnnotation]
# flags: --disallow-untyped-defs --show-error-end
if int():
def f(x: int):
pass

def g(x):
pass
[out]
main:3:5:3:15: error: Function is missing a return type annotation
main:6:5:6:10: error: Function is missing a type annotation

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

Expand Down