Skip to content

Commit 12aa2c8

Browse files
committed
pre-commit
1 parent 73f0222 commit 12aa2c8

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

pandas/core/dtypes/dtypes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,10 +2131,10 @@ def _get_common_dtype(self, dtypes: list[DtypeObj]) -> DtypeObj | None:
21312131
stacklevel=find_stack_level(),
21322132
)
21332133
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]";
2134+
# error: Argument 1 to "np_find_common_type" has incompatible type
2135+
# "*Generator[Any | dtype[Any] | ExtensionDtype, None, None]";
21362136
# expected "dtype[Any]" [arg-type]
2137-
return SparseDtype(np_find_common_type(*np_dtypes), fill_value=fill_value) # type: ignore [arg-type]
2137+
return SparseDtype(np_find_common_type(*np_dtypes), fill_value=fill_value) # type: ignore [arg-type]
21382138

21392139

21402140
@register_extension_dtype

pandas/core/indexing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,9 @@ def __setitem__(self, key, value) -> None:
914914
indexer = self._get_setitem_indexer(key)
915915
self._has_valid_setitem_indexer(key)
916916

917-
iloc: _iLocIndexer = cast("_iLocIndexer", self) if self.name == "iloc" else self.obj.iloc
917+
iloc: _iLocIndexer = (
918+
cast("_iLocIndexer", self) if self.name == "iloc" else self.obj.iloc
919+
)
918920
iloc._setitem_with_indexer(indexer, value, self.name)
919921

920922
def _validate_key(self, key, axis: AxisInt) -> None:

pandas/core/nanops.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,9 @@ def nanmean(
726726

727727

728728
@bottleneck_switch()
729-
def nanmedian(values: np.ndarray, *, axis: AxisInt | None = None, skipna: bool = True, mask=None) -> float | np.ndarray:
729+
def nanmedian(
730+
values: np.ndarray, *, axis: AxisInt | None = None, skipna: bool = True, mask=None
731+
) -> float | np.ndarray:
730732
"""
731733
Parameters
732734
----------

pandas/io/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ def get_handle(
916916
encoding=ioargs.encoding,
917917
errors=errors,
918918
newline="",
919-
) # type: ignore[arg-type]
919+
) # type: ignore[arg-type]
920920
handles.append(handle)
921921
# only marked as wrapped when the caller provided a handle
922922
is_wrapped = not (

pandas/plotting/_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,9 +1038,9 @@ def __call__(self, *args, **kwargs):
10381038
label_name = label_kw or y
10391039
data.name = label_name
10401040
else:
1041-
# error: Argument 1 to "len" has incompatible type "Any | bool";
1041+
# error: Argument 1 to "len" has incompatible type "Any | bool";
10421042
# expected "Sized" [arg-type]
1043-
match = is_list_like(label_kw) and len(label_kw) == len(y) # type: ignore[arg-type]
1043+
match = is_list_like(label_kw) and len(label_kw) == len(y) # type: ignore[arg-type]
10441044
if label_kw and not match:
10451045
raise ValueError(
10461046
"label should be list-like and same length as y"

pandas/tests/io/test_sql.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,16 @@ def types_table_metadata(dialect: str):
238238
metadata,
239239
Column("TextCol", TEXT),
240240
# error: Cannot infer type argument 1 of "Column"
241-
Column("DateCol", date_type), # type: ignore[misc]
241+
Column("DateCol", date_type), # type: ignore[misc]
242242
Column("IntDateCol", Integer),
243243
Column("IntDateOnlyCol", Integer),
244244
Column("FloatCol", Float),
245245
Column("IntCol", Integer),
246246
# error: Cannot infer type argument 1 of "Column"
247-
Column("BoolCol", bool_type), # type: ignore[misc]
248-
Column("IntColWithNull", Integer),
247+
Column("BoolCol", bool_type), # type: ignore[misc]
248+
Column("IntColWithNull", Integer),
249249
# error: Cannot infer type argument 1 of "Column"
250-
Column("BoolColWithNull", bool_type), # type: ignore[misc]
250+
Column("BoolColWithNull", bool_type), # type: ignore[misc]
251251
)
252252
return types
253253

0 commit comments

Comments
 (0)