fix(types): narrow metadata value to str in _first_metadata_value

Newer boto3-stubs (>=1.40 floor) types Object metadata values as Any, tripping mypy no-any-return. Narrow with isinstance(value, str).
This commit is contained in:
dudepls[bot]
2026-08-31 19:57:21 +00:00
committed by GitHub
parent cf02da7e0b
commit b1238a62d8
+1 -1
View File
@@ -40,7 +40,7 @@ def _first_metadata_value(metadata: dict[str, Any], *keys: str) -> str | None:
"""Return the first non-empty metadata value matching the provided keys."""
for key in keys:
value = metadata.get(key)
if value not in (None, ""):
if isinstance(value, str) and value:
return value
return None