type: use as keyword in case match

This commit is contained in:
2025-10-26 09:36:54 +02:00
parent 999ad39d6f
commit 6443e02352

View File

@ -57,7 +57,7 @@ class ConfigurationMultiDict(dict[str, Any]):
OptionError: if the key already exists in the dictionary, but not a single value list or a string
"""
match self.get(key):
case [current_value] | str(current_value):
case [current_value] | (str() as current_value):
value = f"{current_value} {value}"
case None:
pass