We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73f0222 commit 12aa2c8Copy full SHA for 12aa2c8
pandas/core/dtypes/dtypes.py
@@ -2131,10 +2131,10 @@ def _get_common_dtype(self, dtypes: list[DtypeObj]) -> DtypeObj | None:
2131
stacklevel=find_stack_level(),
2132
)
2133
np_dtypes = (x.subtype if isinstance(x, SparseDtype) else x for x in dtypes)
2134
- # error: Argument 1 to "np_find_common_type" has incompatible type
2135
- # "*Generator[Any | dtype[Any] | ExtensionDtype, None, None]";
+ # error: Argument 1 to "np_find_common_type" has incompatible type
+ # "*Generator[Any | dtype[Any] | ExtensionDtype, None, None]";
2136
# expected "dtype[Any]" [arg-type]
2137
- return SparseDtype(np_find_common_type(*np_dtypes), fill_value=fill_value) # type: ignore [arg-type]
+ return SparseDtype(np_find_common_type(*np_dtypes), fill_value=fill_value) # type: ignore [arg-type]
2138
2139
2140
@register_extension_dtype
pandas/core/indexing.py
@@ -914,7 +914,9 @@ def __setitem__(self, key, value) -> None:
914
indexer = self._get_setitem_indexer(key)
915
self._has_valid_setitem_indexer(key)
916
917
- iloc: _iLocIndexer = cast("_iLocIndexer", self) if self.name == "iloc" else self.obj.iloc
+ iloc: _iLocIndexer = (
918
+ cast("_iLocIndexer", self) if self.name == "iloc" else self.obj.iloc
919
+ )
920
iloc._setitem_with_indexer(indexer, value, self.name)
921
922
def _validate_key(self, key, axis: AxisInt) -> None:
pandas/core/nanops.py
@@ -726,7 +726,9 @@ def nanmean(
726
727
728
@bottleneck_switch()
729
-def nanmedian(values: np.ndarray, *, axis: AxisInt | None = None, skipna: bool = True, mask=None) -> float | np.ndarray:
+def nanmedian(
730
+ values: np.ndarray, *, axis: AxisInt | None = None, skipna: bool = True, mask=None
731
+) -> float | np.ndarray:
732
"""
733
Parameters
734
----------
pandas/io/common.py
@@ -916,7 +916,7 @@ def get_handle(
encoding=ioargs.encoding,
errors=errors,
newline="",
- ) # type: ignore[arg-type]
+ ) # type: ignore[arg-type]
handles.append(handle)
# only marked as wrapped when the caller provided a handle
is_wrapped = not (
pandas/plotting/_core.py
@@ -1038,9 +1038,9 @@ def __call__(self, *args, **kwargs):
1038
label_name = label_kw or y
1039
data.name = label_name
1040
else:
1041
- # error: Argument 1 to "len" has incompatible type "Any | bool";
+ # error: Argument 1 to "len" has incompatible type "Any | bool";
1042
# expected "Sized" [arg-type]
1043
- match = is_list_like(label_kw) and len(label_kw) == len(y) # type: ignore[arg-type]
+ match = is_list_like(label_kw) and len(label_kw) == len(y) # type: ignore[arg-type]
1044
if label_kw and not match:
1045
raise ValueError(
1046
"label should be list-like and same length as y"
pandas/tests/io/test_sql.py
@@ -238,16 +238,16 @@ def types_table_metadata(dialect: str):
238
metadata,
239
Column("TextCol", TEXT),
240
# error: Cannot infer type argument 1 of "Column"
241
- Column("DateCol", date_type), # type: ignore[misc]
+ Column("DateCol", date_type), # type: ignore[misc]
242
Column("IntDateCol", Integer),
243
Column("IntDateOnlyCol", Integer),
244
Column("FloatCol", Float),
245
Column("IntCol", Integer),
246
247
- Column("BoolCol", bool_type), # type: ignore[misc]
248
- Column("IntColWithNull", Integer),
+ Column("BoolCol", bool_type), # type: ignore[misc]
+ Column("IntColWithNull", Integer),
249
250
- Column("BoolColWithNull", bool_type), # type: ignore[misc]
+ Column("BoolColWithNull", bool_type), # type: ignore[misc]
251
252
return types
253
0 commit comments