mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 05:12:54 +00:00
Replace % and str.format() with f-strings (#875)
* Replace % and str.format() with f-strings. * Apply suggestions from review.
This commit is contained in:
@@ -37,9 +37,7 @@ def parse_serial(value):
|
||||
raise ValueError("the value is not in range [0, 255]")
|
||||
except ValueError as exc:
|
||||
raise ValueError(
|
||||
"The {idx}{th} part {part!r} is not a hexadecimal number in range [0, 255]: {exc}".format(
|
||||
idx=i + 1, th=th(i + 1), part=part, exc=exc
|
||||
)
|
||||
f"The {i + 1}{th(i + 1)} part {part!r} is not a hexadecimal number in range [0, 255]: {exc}"
|
||||
)
|
||||
result = (result << 8) | part_value
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user