From 1f5cf7a377da0f0b0a130abf244ca22e9b5356d9 Mon Sep 17 00:00:00 2001 From: Henry Gessau Date: Sat, 11 Nov 2023 11:45:36 -0500 Subject: [PATCH] lint --- tests/rules/test_key_scalar_types.py | 4 ++-- yamllint/rules/key_node_kinds.py | 4 ++-- yamllint/rules/key_scalar_types.py | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/rules/test_key_scalar_types.py b/tests/rules/test_key_scalar_types.py index 59d8de33..1625bfd1 100644 --- a/tests/rules/test_key_scalar_types.py +++ b/tests/rules/test_key_scalar_types.py @@ -22,8 +22,8 @@ class KeyScalarTypesTestCase(RuleTestCase): def _check_all(self, target, conf, passes): """ - Expect all the lines in the target to pass, or all to fail, depending on - the value of `passes`. + Expect all the lines in the target to pass, or all to fail, depending + on the value of `passes`. """ lines = target.splitlines()[1:] if passes: diff --git a/yamllint/rules/key_node_kinds.py b/yamllint/rules/key_node_kinds.py index 64138e49..f2d97504 100644 --- a/yamllint/rules/key_node_kinds.py +++ b/yamllint/rules/key_node_kinds.py @@ -14,8 +14,8 @@ # along with this program. If not, see . """ -Use this rule to control the kinds of nodes (https://yaml.org/spec/1.2.2/#nodes) -that can be used for keys in mappings. +Use this rule to control the kinds of nodes +(https://yaml.org/spec/1.2.2/#nodes) that can be used for keys in mappings. .. rubric:: Options diff --git a/yamllint/rules/key_scalar_types.py b/yamllint/rules/key_scalar_types.py index 2cb65c50..79ffc00e 100644 --- a/yamllint/rules/key_scalar_types.py +++ b/yamllint/rules/key_scalar_types.py @@ -14,7 +14,8 @@ # along with this program. If not, see . """ -Use this rule to control the scalar types that are allowed for keys in mappings. +Use this rule to control the scalar types that are allowed for keys in +mappings. .. rubric:: Options @@ -114,7 +115,7 @@ def VALIDATE(conf): seen_types = [] for allowed_type in key_scalar_types: if allowed_type is None: - return f'scalar type "null" must be quoted in "allowed" list' + return 'scalar type "null" must be quoted in "allowed" list' if allowed_type in seen_types: return f'duplicate scalar type "{allowed_type}" in "allowed" list' seen_types.append(allowed_type)