From 17c8beed5454bd7501d8a550394e87ed30de05af Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 23 Sep 2023 20:33:30 +0200 Subject: [PATCH] rules: apply a couple refurb suggestions I kept only those improving readability. --- yamllint/rules/quoted_strings.py | 2 +- yamllint/rules/truthy.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yamllint/rules/quoted_strings.py b/yamllint/rules/quoted_strings.py index bac4db84..e4c86f16 100644 --- a/yamllint/rules/quoted_strings.py +++ b/yamllint/rules/quoted_strings.py @@ -176,7 +176,7 @@ def VALIDATE(conf): |[-+]?0[0-7_]+ |[-+]?(?:0|[1-9][0-9_]*) |[-+]?0x[0-9a-fA-F_]+ - |[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$''', re.X), + |[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$''', re.VERBOSE), list('-+0123456789')) diff --git a/yamllint/rules/truthy.py b/yamllint/rules/truthy.py index 95c3bc3a..d19f6eaf 100644 --- a/yamllint/rules/truthy.py +++ b/yamllint/rules/truthy.py @@ -136,7 +136,7 @@ ID = 'truthy' TYPE = 'token' -CONF = {'allowed-values': list(TRUTHY), 'check-keys': bool} +CONF = {'allowed-values': TRUTHY.copy(), 'check-keys': bool} DEFAULT = {'allowed-values': ['true', 'false'], 'check-keys': True}