basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

"syntax" errors in type annotations should have a code

Open KotlinIsland opened this issue 1 year ago • 1 comments

x: "int str"  # Unexpected token at end of expression

this is an invalid type annotation, but it's not a syntax error, and i can't suppress it

KotlinIsland avatar Jul 31 '24 23:07 KotlinIsland

syntax errors should only be reported on actual syntax errors. since this code is syntactically valid, it should be a normal error with a diagnostic rule code

DetachHead avatar Jul 31 '24 23:07 DetachHead