Address use-list-literal.

This commit is contained in:
Felix Fontein 2025-10-12 10:22:11 +02:00
parent 98c5a4a7d8
commit c45bd75cfc
2 changed files with 1 additions and 2 deletions

View File

@ -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

View File

@ -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