diff --git a/stubs/openpyxl/openpyxl/styles/named_styles.pyi b/stubs/openpyxl/openpyxl/styles/named_styles.pyi index e601c0714dea..805034cff490 100644 --- a/stubs/openpyxl/openpyxl/styles/named_styles.pyi +++ b/stubs/openpyxl/openpyxl/styles/named_styles.pyi @@ -51,7 +51,7 @@ class NamedStyle(Serialisable): class NamedStyleList(list[NamedStyle]): @property def names(self) -> list[str]: ... - def __getitem__(self, key: int) -> NamedStyle: ... + def __getitem__(self, key: int | str) -> NamedStyle: ... # type: ignore[override] def append(self, style: NamedStyle) -> None: ... class _NamedCellStyle(Serialisable):