mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-12 15:05:07 +00:00
use f-strings in module utils (#10901)
* use f-strings in module utils * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> * remove unused imports --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
74b6a0294a
commit
b85e263466
51 changed files with 270 additions and 382 deletions
|
|
@ -35,7 +35,7 @@ def snap_runner(module, **kwargs):
|
|||
_set=cmd_runner_fmt.as_fixed("set"),
|
||||
get=cmd_runner_fmt.as_fixed(["get", "-d"]),
|
||||
classic=cmd_runner_fmt.as_bool("--classic"),
|
||||
channel=cmd_runner_fmt.as_func(lambda v: [] if v == 'stable' else ['--channel', '{0}'.format(v)]),
|
||||
channel=cmd_runner_fmt.as_func(lambda v: [] if v == 'stable' else ['--channel', f'{v}']),
|
||||
options=cmd_runner_fmt.as_list(),
|
||||
info=cmd_runner_fmt.as_fixed("info"),
|
||||
dangerous=cmd_runner_fmt.as_bool("--dangerous"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue