mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-27 06:09:37 -07:00
use f-strings (#10899)
* use f-strings * add changelog frag * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
8a1ed41fe5
commit
3734f471c1
14 changed files with 50 additions and 54 deletions
|
|
@ -66,9 +66,7 @@ def hashids_encode(nums, salt=None, alphabet=None, min_length=None):
|
|||
try:
|
||||
hashid = hashids.encode(*nums)
|
||||
except TypeError as e:
|
||||
raise AnsibleTypeError(
|
||||
"Data to encode must by a tuple or list of ints: %s" % to_native(e)
|
||||
)
|
||||
raise AnsibleTypeError(f"Data to encode must by a tuple or list of ints: {e}")
|
||||
|
||||
return hashid
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue