From 24e4ec7766fd471deb5b7e5087f0e7dba8576cfb Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Tue, 17 Oct 2023 13:45:13 +0100 Subject: gh-110938: Fix error messages for indented blocks with functions and classes with generic type parameters (#110973) --- Lib/test/test_syntax.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Lib/test/test_syntax.py') diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 52fc3573ddb..f5cf9667d56 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -1446,11 +1446,21 @@ Specialized indentation errors: Traceback (most recent call last): IndentationError: expected an indented block after function definition on line 1 + >>> def foo[T](x, /, y, *, z=2): + ... pass + Traceback (most recent call last): + IndentationError: expected an indented block after function definition on line 1 + >>> class Blech(A): ... pass Traceback (most recent call last): IndentationError: expected an indented block after class definition on line 1 + >>> class Blech[T](A): + ... pass + Traceback (most recent call last): + IndentationError: expected an indented block after class definition on line 1 + >>> match something: ... pass Traceback (most recent call last): -- cgit v1.2.3