From 1a9ef5798525bbb39a16c8af5c435b97352ee027 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 15 Sep 2021 17:08:48 +0300 Subject: bpo-44786: Fix a warning in RE in c-analyzer (GH-28351) --- Misc/NEWS.d/next/Tools-Demos/2021-09-14-11-44-26.bpo-44786.DU0LC0.rst | 1 + Tools/c-analyzer/c_common/tables.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Tools-Demos/2021-09-14-11-44-26.bpo-44786.DU0LC0.rst 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 index 0000000..96ebf2c --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2021-09-14-11-44-26.bpo-44786.DU0LC0.rst @@ -0,0 +1 @@ +Fix a warning in regular expression in the c-analyzer script. diff --git a/Tools/c-analyzer/c_common/tables.py b/Tools/c-analyzer/c_common/tables.py index 85b5019..130be6b 100644 --- a/Tools/c-analyzer/c_common/tables.py +++ b/Tools/c-analyzer/c_common/tables.py @@ -236,12 +236,12 @@ def build_table(specs, *, sep=' ', defaultwidth=None): _COLSPEC_RE = re.compile(textwrap.dedent(r''' ^ (?: - [[] + \[ ( (?: [^\s\]] [^\]]* )? [^\s\]] ) #