mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00: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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user