Skip to content

Commit 309ba5f

Browse files
typing
1 parent 571aee8 commit 309ba5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/arrays/categorical.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,8 +2237,9 @@ def _repr_categories(self) -> list[str]:
22372237
if self.categories.dtype == "str":
22382238
# the extension array formatter defaults to boxed=True in format_array
22392239
# override here to boxed=False to be consistent with QUOTE_NONNUMERIC
2240-
arr: ExtensionArray = self.categories._values
2241-
formatter = arr._formatter(boxed=False)
2240+
formatter = cast(ExtensionArray, self.categories._values)._formatter(
2241+
boxed=False
2242+
)
22422243

22432244
format_array = partial(
22442245
fmt.format_array, formatter=formatter, quoting=QUOTE_NONNUMERIC

0 commit comments

Comments
 (0)