Skip to content

Commit beb6649

Browse files
committed
Fix typing checks
1 parent 510d4b3 commit beb6649

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/core/internals/managers.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,7 +2441,7 @@ def _consolidate(blocks: tuple[Block, ...]) -> Generator[Block]:
24412441
yield from _merge_blocks(tuple(group_blocks), can_consolidate=_can_consolidate)
24422442

24432443

2444-
def _merge_blocks(blocks: tuple[Block], can_consolidate: bool) -> Generator[Block]:
2444+
def _merge_blocks(blocks: tuple[Block, ...], can_consolidate: bool) -> Generator[Block]:
24452445
if len(blocks) == 1:
24462446
yield from blocks
24472447
elif can_consolidate:
@@ -2452,11 +2452,7 @@ def _merge_blocks(blocks: tuple[Block], can_consolidate: bool) -> Generator[Bloc
24522452
new_values: ArrayLike
24532453

24542454
if isinstance(blocks[0].dtype, np.dtype):
2455-
# error: List comprehension has incompatible type List[Union[ndarray,
2456-
# ExtensionArray]]; expected List[Union[complex, generic,
2457-
# Sequence[Union[int, float, complex, str, bytes, generic]],
2458-
# Sequence[Sequence[Any]], SupportsArray]]
2459-
new_values = np.vstack([b.values for b in blocks]) # type: ignore[misc]
2455+
new_values = np.vstack([b.values for b in blocks])
24602456
else:
24612457
bvals = [blk.values for blk in blocks]
24622458
bvals2 = cast(Sequence[NDArrayBackedExtensionArray], bvals)

0 commit comments

Comments
 (0)