summaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authorStephane Odul <1504511+sodul@users.noreply.github.com>2023-03-28 13:49:51 -0700
committerGitHub <noreply@github.com>2023-03-28 20:49:51 +0000
commit43eb61e47410a1099cf045ee55610245a0896782 (patch)
tree90556d99266676c676418c96c5409b72c8da6d8f /tests/functional
parentf95b5b126cfc1ec48e4dc83cbb057cd20aa41803 (diff)
downloadpylint-git-43eb61e47410a1099cf045ee55610245a0896782.tar.gz
Allow integers in TypeAlias names (#8488)
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/t/typealias_naming_style_default.py3
-rw-r--r--tests/functional/t/typealias_naming_style_default.txt21
2 files changed, 14 insertions, 10 deletions
diff --git a/tests/functional/t/typealias_naming_style_default.py b/tests/functional/t/typealias_naming_style_default.py
index a2d02c0c6..6b27c14a0 100644
--- a/tests/functional/t/typealias_naming_style_default.py
+++ b/tests/functional/t/typealias_naming_style_default.py
@@ -9,6 +9,8 @@ AnotherGoodName = Union[int, str]
GOODName: TypeAlias = int
GOODNAMEType: TypeAlias = int
TodoType: TypeAlias = int
+Good2Name: TypeAlias = int
+GoodName2: TypeAlias = int
# Non-PascalCase names
BadNAME: TypeAlias = int # [invalid-name]
@@ -20,6 +22,7 @@ BadNameT: TypeAlias = int # [invalid-name]
BAD_NAME = Union[int, str] # [invalid-name]
_BAD_NAME = Union[int, str] # [invalid-name]
__BAD_NAME = Union[int, str] # [invalid-name]
+_1BadName = Union[int, str] # [invalid-name]
ANOTHERBADNAME = Union[int, str] # [invalid-name]
# Regression tests
diff --git a/tests/functional/t/typealias_naming_style_default.txt b/tests/functional/t/typealias_naming_style_default.txt
index 237dac076..455cbc213 100644
--- a/tests/functional/t/typealias_naming_style_default.txt
+++ b/tests/functional/t/typealias_naming_style_default.txt
@@ -1,10 +1,11 @@
-invalid-name:14:0:14:7::"Type alias name ""BadNAME"" doesn't conform to predefined naming style":HIGH
-invalid-name:15:0:15:7::"Type alias name ""badName"" doesn't conform to predefined naming style":HIGH
-invalid-name:16:0:16:11::"Type alias name ""AlsoBADName"" doesn't conform to predefined naming style":HIGH
-invalid-name:17:0:17:8::"Type alias name ""TBadName"" doesn't conform to predefined naming style":HIGH
-invalid-name:18:0:18:8::"Type alias name ""TypeTodo"" doesn't conform to predefined naming style":HIGH
-invalid-name:19:0:19:8::"Type alias name ""BadNameT"" doesn't conform to predefined naming style":HIGH
-invalid-name:20:0:20:8::"Type alias name ""BAD_NAME"" doesn't conform to predefined naming style":HIGH
-invalid-name:21:0:21:9::"Type alias name ""_BAD_NAME"" doesn't conform to predefined naming style":HIGH
-invalid-name:22:0:22:10::"Type alias name ""__BAD_NAME"" doesn't conform to predefined naming style":HIGH
-invalid-name:23:0:23:14::"Type alias name ""ANOTHERBADNAME"" doesn't conform to predefined naming style":HIGH
+invalid-name:16:0:16:7::"Type alias name ""BadNAME"" doesn't conform to predefined naming style":HIGH
+invalid-name:17:0:17:7::"Type alias name ""badName"" doesn't conform to predefined naming style":HIGH
+invalid-name:18:0:18:11::"Type alias name ""AlsoBADName"" doesn't conform to predefined naming style":HIGH
+invalid-name:19:0:19:8::"Type alias name ""TBadName"" doesn't conform to predefined naming style":HIGH
+invalid-name:20:0:20:8::"Type alias name ""TypeTodo"" doesn't conform to predefined naming style":HIGH
+invalid-name:21:0:21:8::"Type alias name ""BadNameT"" doesn't conform to predefined naming style":HIGH
+invalid-name:22:0:22:8::"Type alias name ""BAD_NAME"" doesn't conform to predefined naming style":HIGH
+invalid-name:23:0:23:9::"Type alias name ""_BAD_NAME"" doesn't conform to predefined naming style":HIGH
+invalid-name:24:0:24:10::"Type alias name ""__BAD_NAME"" doesn't conform to predefined naming style":HIGH
+invalid-name:25:0:25:9::"Type alias name ""_1BadName"" doesn't conform to predefined naming style":HIGH
+invalid-name:26:0:26:14::"Type alias name ""ANOTHERBADNAME"" doesn't conform to predefined naming style":HIGH