From 472bf6ebfc3814ea1746dc17858db779df9ca85b Mon Sep 17 00:00:00 2001 From: 11happy Date: Wed, 15 Oct 2025 21:50:25 +0530 Subject: [PATCH] test: add more test & update snapshot Signed-off-by: 11happy --- ...error_AnnotatedGlobal_annotated_global_3.10.snap | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/ruff_linter/src/snapshots/ruff_linter__linter__tests__semantic_syntax_error_AnnotatedGlobal_annotated_global_3.10.snap b/crates/ruff_linter/src/snapshots/ruff_linter__linter__tests__semantic_syntax_error_AnnotatedGlobal_annotated_global_3.10.snap index 6611db27bc..92830e2891 100644 --- a/crates/ruff_linter/src/snapshots/ruff_linter__linter__tests__semantic_syntax_error_AnnotatedGlobal_annotated_global_3.10.snap +++ b/crates/ruff_linter/src/snapshots/ruff_linter__linter__tests__semantic_syntax_error_AnnotatedGlobal_annotated_global_3.10.snap @@ -30,4 +30,17 @@ invalid-syntax: annotated name `c` can't be global 15 | global c 16 | c: list[str] = [] | ^ +17 | +18 | d: int = 1 + | + +invalid-syntax: annotated name `d` can't be global + --> :21:5 + | +19 | def f3(): +20 | global d +21 | d: str + | ^ +22 | +23 | e: int = 1 |