diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-09-15 16:43:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 16:43:25 (GMT) |
commit | 89966f59c2e1d0558f8126458acc7d7ae2a8fef5 (patch) | |
tree | 7e8a39d1b686db61b9f98c08246f2bc7585c78e1 | |
parent | ececa53b7fc9c21d0c8153153e3c19da1d0a1e80 (diff) | |
download | cpython-89966f59c2e1d0558f8126458acc7d7ae2a8fef5.zip cpython-89966f59c2e1d0558f8126458acc7d7ae2a8fef5.tar.gz cpython-89966f59c2e1d0558f8126458acc7d7ae2a8fef5.tar.bz2 |
bpo-44786: Fix a warning in RE in c-analyzer (GH-28351) (GH-28353)
(cherry picked from commit 1a9ef5798525bbb39a16c8af5c435b97352ee027)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
-rw-r--r-- | Misc/NEWS.d/next/Tools-Demos/2021-09-14-11-44-26.bpo-44786.DU0LC0.rst | 1 | ||||
-rw-r--r-- | Tools/c-analyzer/c_common/tables.py | 4 |
2 files changed, 3 insertions, 2 deletions
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\]] ) # <label> - []] + ] )? ( \w+ ) # <field> (?: |