From 71a8d4a82caf17350cd3fad4ba6feb7b7fdb3e94 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 12 Sep 2017 18:47:55 +0300 Subject: [PATCH] config: simplify cache regular expressions --- pygnulib/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygnulib/config.py b/pygnulib/config.py index d08181db6..b174b166a 100644 --- a/pygnulib/config.py +++ b/pygnulib/config.py @@ -430,9 +430,9 @@ class Base: class Cache(Base): """gnulib cached configuration""" _AUTOCONF_ = { - "autoconf" : _re_.compile(".*AC_PREREQ\\(\\[(.*?)\\]\\)", _re_.S | _re_.M), - "auxdir" : _re_.compile("^AC_CONFIG_AUX_DIR\\(\\[(.*?)\\]\\)$", _re_.S | _re_.M), - "libtool" : _re_.compile("A[CM]_PROG_LIBTOOL", _re_.S | _re_.M) + "autoconf" : _re_.compile(r"AC_PREREQ\(\[(.*?)\]\)", _re_.S | _re_.M), + "auxdir" : _re_.compile(r"AC_CONFIG_AUX_DIR\(\[(.*?)\]\)$", _re_.S | _re_.M), + "libtool" : _re_.compile(r"A[CM]_PROG_LIBTOOL", _re_.S | _re_.M) } _GNULIB_CACHE_ = { "local" : (str, "gl_LOCAL_DIR"), @@ -470,7 +470,7 @@ class Cache(Base): _GNULIB_CACHE_STR_ += [_key_] else: _GNULIB_CACHE_LIST_ += [_key_] - _GNULIB_CACHE_PATTERN_ = _re_.compile("^(gl_.*?)\\(\\[(.*?)\\]\\)$", _re_.S | _re_.M) + _GNULIB_CACHE_PATTERN_ = _re_.compile(r"^(gl_.*?)\(\[(.*?)\]\)$", _re_.S | _re_.M) def __init__(self, root, m4_base, autoconf=None, **kwargs): -- 2.13.4