summaryrefslogtreecommitdiff
path: root/doc
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 /doc
parentf95b5b126cfc1ec48e4dc83cbb057cd20aa41803 (diff)
downloadpylint-git-43eb61e47410a1099cf045ee55610245a0896782.tar.gz
Allow integers in TypeAlias names (#8488)
Diffstat (limited to 'doc')
-rw-r--r--doc/data/messages/i/invalid-name/details.rst10
-rw-r--r--doc/whatsnew/fragments/8485.false_positive5
2 files changed, 10 insertions, 5 deletions
diff --git a/doc/data/messages/i/invalid-name/details.rst b/doc/data/messages/i/invalid-name/details.rst
index ad155bc14..7e2090158 100644
--- a/doc/data/messages/i/invalid-name/details.rst
+++ b/doc/data/messages/i/invalid-name/details.rst
@@ -88,11 +88,11 @@ The following type of names are checked with a predefined pattern:
| ``typevar`` | ``T``, ``_CallableT``, ``_T_co``, ``AnyStr``, | ``DICT_T``, ``CALLABLE_T``, ``ENUM_T``, ``DeviceType``, |
| | ``DeviceTypeT``, ``IPAddressT`` | ``_StrType`` |
+--------------------+-------------------------------------------------------+------------------------------------------------------------+
-| ``typealias`` | ``GoodName``, ``_GoodName``, ``IPAddressType`` and | ``BadNameT``, ``badName``, ``TBadName``, ``TypeBadName`` |
-| | other PascalCase variants that don't start with ``T``| |
-| | or ``Type``. This is to distinguish them from | |
-| | ``typevars``. Note that ``TopName`` is allowed but | |
-| | ``TTopName`` isn't. | |
+| ``typealias`` | ``GoodName``, ``_GoodName``, ``IPAddressType``, | ``BadNameT``, ``badName``, ``TBadName``, ``TypeBadName``, |
+| | ``GoodName2`` and other PascalCase variants that | ``_1BadName`` |
+| | don't start with ``T`` or ``Type``. This is to | |
+| | distinguish them from ``typevars``. Note that | |
+| | ``TopName`` is allowed but ``TTopName`` isn't. | |
+--------------------+-------------------------------------------------------+------------------------------------------------------------+
Custom regular expressions
diff --git a/doc/whatsnew/fragments/8485.false_positive b/doc/whatsnew/fragments/8485.false_positive
new file mode 100644
index 000000000..987911333
--- /dev/null
+++ b/doc/whatsnew/fragments/8485.false_positive
@@ -0,0 +1,5 @@
+``invalid-name`` now allows for integers in ``typealias`` names:
+- now valid: ``Good2Name``, ``GoodName2``.
+- still invalid: ``_1BadName``.
+
+Closes #8485