]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44786: Fix a warning in RE in c-analyzer (GH-28351) (GH-28353)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 15 Sep 2021 16:43:25 +0000 (09:43 -0700)
committerGitHub <noreply@github.com>
Wed, 15 Sep 2021 16:43:25 +0000 (19:43 +0300)
(cherry picked from commit 1a9ef5798525bbb39a16c8af5c435b97352ee027)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Misc/NEWS.d/next/Tools-Demos/2021-09-14-11-44-26.bpo-44786.DU0LC0.rst [new file with mode: 0644]
Tools/c-analyzer/c_common/tables.py

diff --git a/Misc/NEWS.d/next/Tools-Demos/2021-09-14-11-44-26.bpo-44786.DU0LC0.rst b/Misc/NEWS.d/next/Tools-Demos/2021-09-14-11-44-26.bpo-44786.DU0LC0.rst
new file mode 100644 (file)
index 0000000..96ebf2c
--- /dev/null
@@ -0,0 +1 @@
+Fix a warning in regular expression in the c-analyzer script.
index 85b501925715d37e29bf192107009831590e4040..130be6beba5f81579a7c169ba999fc28fbda6fb1 100644 (file)
@@ -236,12 +236,12 @@ def build_table(specs, *, sep=' ', defaultwidth=None):
 _COLSPEC_RE = re.compile(textwrap.dedent(r'''
     ^
     (?:
-        [[]
+        \[
         (
             (?: [^\s\]] [^\]]* )?
             [^\s\]]
         )  # <label>
-        []]
+        ]
     )?
     ( \w+ )  # <field>
     (?: