Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TYP: Remove unused mypy ignores #61330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove unused mypy ignores
  • Loading branch information
mroeschke committed Apr 21, 2025
commit eab9f877c3a874afc35e10d3dc6fd3cd4ab3c037
2 changes: 1 addition & 1 deletion 2 pandas/core/arrays/masked.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def tolist(self) -> list:
if self.ndim > 1:
return [x.tolist() for x in self]
dtype = None if self._hasna else self._data.dtype
return self.to_numpy(dtype=dtype, na_value=libmissing.NA).tolist() # type: ignore[return-value]
return self.to_numpy(dtype=dtype, na_value=libmissing.NA).tolist()

@overload
def astype(self, dtype: npt.DTypeLike, copy: bool = ...) -> np.ndarray: ...
Expand Down
2 changes: 1 addition & 1 deletion 2 pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ def tolist(self) -> list:
>>> idx.to_list()
[1, 2, 3]
"""
return self._values.tolist() # type: ignore[return-value]
return self._values.tolist()

to_list = tolist

Expand Down
2 changes: 1 addition & 1 deletion 2 pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2142,7 +2142,7 @@ def _wrap_applied_output_series(

if stacked_values.dtype == object:
# We'll have the DataFrame constructor do inference
stacked_values = stacked_values.tolist() # type: ignore[assignment]
stacked_values = stacked_values.tolist()
result = self.obj._constructor(stacked_values, index=index, columns=columns)

if not self.as_index:
Expand Down
2 changes: 1 addition & 1 deletion 2 pandas/io/formats/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ def _format_strings(self) -> list[str]:
fmt_values = values._format_native_types(
na_rep=self.nat_rep, date_format=self.date_format
)
return fmt_values.tolist() # type: ignore[return-value]
return fmt_values.tolist()


class _ExtensionArrayFormatter(_GenericArrayFormatter):
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.