mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Remove uses of assert in production code (#32079)
* Remove uses of assert in production code * Fix assertion * Add code smell test for assertions, currently limited to lib/ansible * Fix assertion * Add docs for no-assert * Remove new assert from enos * Fix assert in module_utils.connection
This commit is contained in:
@@ -115,7 +115,8 @@ def get_config(module, flags=None):
|
||||
|
||||
|
||||
def to_commands(module, commands):
|
||||
assert isinstance(commands, list), 'argument must be of type <list>'
|
||||
if not isinstance(commands, list):
|
||||
raise AssertionError('argument must be of type <list>')
|
||||
|
||||
transform = EntityCollection(module, command_spec)
|
||||
commands = transform(commands)
|
||||
|
||||
Reference in New Issue
Block a user