mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
float-values: Add missing quotes in problems messages
To be consistent with other existing messages, e.g.: - forbidden not a number value ".NaN" - found forbidden document start "---" - missing document start "---" - truthy value should be one of ["true"] - forbidden implicit octal value "0777"
This commit is contained in:
parent
8ac7d58693
commit
e6af957131
@ -129,14 +129,14 @@ def check(conf, token, prev, next, nextnext, context):
|
||||
yield LintProblem(
|
||||
token.start_mark.line + 1,
|
||||
token.start_mark.column + 1,
|
||||
'forbidden not a number value "%s"' % token.value,
|
||||
f'forbidden not a number value "{token.value}"',
|
||||
)
|
||||
|
||||
if conf['forbid-inf'] and IS_INF_PATTERN.match(val):
|
||||
yield LintProblem(
|
||||
token.start_mark.line + 1,
|
||||
token.start_mark.column + 1,
|
||||
f"forbidden infinite value {token.value}",
|
||||
f'forbidden infinite value "{token.value}"',
|
||||
)
|
||||
|
||||
if conf[
|
||||
@ -145,7 +145,7 @@ def check(conf, token, prev, next, nextnext, context):
|
||||
yield LintProblem(
|
||||
token.start_mark.line + 1,
|
||||
token.start_mark.column + 1,
|
||||
f"forbidden scientific notation {token.value}",
|
||||
f'forbidden scientific notation "{token.value}"',
|
||||
)
|
||||
|
||||
if conf[
|
||||
@ -154,5 +154,5 @@ def check(conf, token, prev, next, nextnext, context):
|
||||
yield LintProblem(
|
||||
token.start_mark.line + 1,
|
||||
token.start_mark.column + 1,
|
||||
f"forbidden decimal missing 0 prefix {token.value}",
|
||||
f'forbidden decimal missing 0 prefix "{token.value}"',
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user