diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-03-28 22:55:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 22:55:13 +0200 |
commit | 4e11693a411433cb03b07fc3a04f2e4151280953 (patch) | |
tree | b868da27bd7e21f22e9ff93f7ea6ee097ee21857 /tests | |
parent | d429822d56c392b4be914f94d55807b55efbd705 (diff) | |
download | pylint-git-4e11693a411433cb03b07fc3a04f2e4151280953.tar.gz |
[Backport maintenance/2.17.x] Allow integers in TypeAlias names. (#8507)
Co-authored-by: Stephane Odul <1504511+sodul@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/t/typealias_naming_style_default.py | 3 | ||||
-rw-r--r-- | tests/functional/t/typealias_naming_style_default.txt | 21 |
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 |