]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44786: Fix a warning in RE in c-analyzer (GH-28351)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 15 Sep 2021 14:08:48 +0000 (17:08 +0300)
committerGitHub <noreply@github.com>
Wed, 15 Sep 2021 14:08:48 +0000 (17:08 +0300)
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>
     (?: