diff --git a/.pylintrc b/.pylintrc index ecbaaade..aceb0e13 100644 --- a/.pylintrc +++ b/.pylintrc @@ -395,7 +395,6 @@ disable=raw-checker-failed, unused-argument, unused-variable, use-dict-literal, - use-list-literal, # Cannot remove yet due to inadequacy of rules inconsistent-return-statements, # doesn't notice that fail_json() does not return diff --git a/plugins/inventory/docker_containers.py b/plugins/inventory/docker_containers.py index 0ce54134..3b6fc885 100644 --- a/plugins/inventory/docker_containers.py +++ b/plugins/inventory/docker_containers.py @@ -247,7 +247,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable): short_container_id = container_id[:13] try: - name = container.get("Names", list())[0].lstrip("/") + name = container.get("Names", [])[0].lstrip("/") full_name = name except IndexError: name = short_container_id