Skip to content

Commit 97df043

Browse files
committed
chore(mypy): ignore mypy errors
1 parent 3357468 commit 97df043

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

pandas/core/algorithms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def _reconstruct_data(
220220
values = cls._from_sequence(values, dtype=dtype) # type: ignore[assignment]
221221

222222
else:
223-
values = values.astype(dtype, copy=False)
223+
values = values.astype(dtype, copy=False) # type: ignore[assignment]
224224

225225
return values
226226

pandas/core/arrays/_mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def view(self, dtype: Dtype | None = None) -> ArrayLike:
151151

152152
td64_values = arr.view(dtype)
153153
return TimedeltaArray._simple_new(td64_values, dtype=dtype)
154-
return arr.view(dtype=dtype)
154+
return arr.view(dtype=dtype) # type: ignore[arg-type]
155155

156156
def take(
157157
self,

pandas/core/arrays/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ def _add_offset(self, offset: BaseOffset) -> Self:
804804
try:
805805
res_values = offset._apply_array(values._ndarray)
806806
if res_values.dtype.kind == "i":
807-
res_values = res_values.view(values.dtype)
807+
res_values = res_values.view(values.dtype) # type: ignore[arg-type]
808808
except NotImplementedError:
809809
if get_option("performance_warnings"):
810810
warnings.warn(

pandas/core/reshape/merge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,7 @@ def _maybe_coerce_merge_keys(self) -> None:
17461746

17471747
mask = ~np.isnan(lk)
17481748
match = lk == casted
1749-
if not match[mask].all():
1749+
if not match[mask].all(): # type: ignore[union-attr]
17501750
warnings.warn(
17511751
"You are merging on int and float "
17521752
"columns where the float values "
@@ -1766,7 +1766,7 @@ def _maybe_coerce_merge_keys(self) -> None:
17661766

17671767
mask = ~np.isnan(rk)
17681768
match = rk == casted
1769-
if not match[mask].all():
1769+
if not match[mask].all(): # type: ignore[union-attr]
17701770
warnings.warn(
17711771
"You are merging on int and float "
17721772
"columns where the float values "

pandas/core/util/hashing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ def _hash_ndarray(
324324
)
325325

326326
codes, categories = factorize(vals, sort=False)
327-
dtype = CategoricalDtype(categories=Index(categories), ordered=False)
328-
cat = Categorical._simple_new(codes, dtype)
327+
dtype = CategoricalDtype(categories=Index(categories), ordered=False) # type: ignore[assignment]
328+
cat = Categorical._simple_new(codes, dtype) # type: ignore[arg-type]
329329
return cat._hash_pandas_object(
330330
encoding=encoding, hash_key=hash_key, categorize=False
331331
)

pandas/io/pytables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3306,13 +3306,13 @@ def write_array(
33063306
self._handle.create_array(
33073307
self.group,
33083308
key,
3309-
value.asi8,
3309+
value.asi8, # type: ignore[attr-defined]
33103310
)
33113311

33123312
node = getattr(self.group, key)
33133313
# error: Item "ExtensionArray" of "Union[Any, ExtensionArray]" has no
33143314
# attribute "tz"
3315-
node._v_attrs.tz = _get_tz(value.tz)
3315+
node._v_attrs.tz = _get_tz(value.tz) # type: ignore[attr-defined]
33163316
node._v_attrs.value_type = f"datetime64[{value.dtype.unit}]"
33173317
elif lib.is_np_dtype(value.dtype, "m"):
33183318
self._handle.create_array(self.group, key, value.view("i8"))

0 commit comments

Comments
 (0)