
3 Mar
2022
3 Mar
'22
10:07 p.m.
On 24/02/2022 02:00, Simon Glass wrote:
Simplify the code by using the available function.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v2:
- Add new patch to use re.fullmatch() to avoid extra check
tools/moveconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Alper Nebi Yasak alpernebiyasak@gmail.com
diff --git a/tools/moveconfig.py b/tools/moveconfig.py index dea60f4661..4b0e2e250b 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -1610,8 +1610,8 @@ def defconfig_matches(configs, re_match): bool: True if any CONFIG matches the regex """ for cfg in configs:
m_cfg = re_match.match(cfg)
if m_cfg and m_cfg.span()[1] == len(cfg):
m_cfg = re_match.fullmatch(cfg)
if m_cfg:
Could skip the variable entirely.
return True return False