Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryGessau committed Nov 11, 2023
1 parent cccc4c6 commit 1f5cf7a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/rules/test_key_scalar_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions yamllint/rules/key_node_kinds.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""
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
Expand Down
5 changes: 3 additions & 2 deletions yamllint/rules/key_scalar_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""
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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1f5cf7a

Please sign in to comment.