From ebf1952eb5b4bac46751d91181a62bea4bd6599f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:53:01 +0100 Subject: Don't consider ``Union`` to always be a type alias (#8489) Co-authored-by: Pierre Sassoulas (cherry picked from commit 07127ee75f3456920ff5117cdbaf8697744b6cfc) --- tests/functional/t/typealias_naming_style_default.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/functional/t/typealias_naming_style_default.py b/tests/functional/t/typealias_naming_style_default.py index 45f801521..a2d02c0c6 100644 --- a/tests/functional/t/typealias_naming_style_default.py +++ b/tests/functional/t/typealias_naming_style_default.py @@ -21,3 +21,7 @@ BAD_NAME = Union[int, str] # [invalid-name] _BAD_NAME = Union[int, str] # [invalid-name] __BAD_NAME = Union[int, str] # [invalid-name] ANOTHERBADNAME = Union[int, str] # [invalid-name] + +# Regression tests +# This is not a TypeAlias, and thus shouldn't flag the message +x: Union[str, int] = 42 -- cgit v1.2.1