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

Skip to content

Commit 5f88e5d

Browse files
committed
Add test for line and column end for missing function type annotation
1 parent 4259e37 commit 5f88e5d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test-data/unit/check-columns.test

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,18 @@ if int():
178178
def g(x): # E:5: Function is missing a type annotation
179179
pass
180180

181+
[case testColumnEndFunctionMissingTypeAnnotation]
182+
# flags: --disallow-untyped-defs --show-error-end
183+
if int():
184+
def f(x: int):
185+
pass
186+
187+
def g(x):
188+
pass
189+
[out]
190+
main:3:5:3:15: error: Function is missing a return type annotation
191+
main:6:5:6:10: error: Function is missing a type annotation
192+
181193
[case testColumnNameIsNotDefined]
182194
((x)) # E:3: Name "x" is not defined
183195

0 commit comments

Comments
 (0)