-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Fix docstring timestamps#59458 #59533
Merged
mroeschke
merged 15 commits into
pandas-dev:main
from
uditbaliyan:fix-docstring-timestamps#59458
Aug 19, 2024
Merged
Fix docstring timestamps#59458 #59533
mroeschke
merged 15 commits into
pandas-dev:main
from
uditbaliyan:fix-docstring-timestamps#59458
Aug 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit cdf36b2.
pandas/plotting/_matplotlib/core.py:549: error: Unused "type: ignore" comment [unused-ignore] @final
def _maybe_right_yaxis(self, ax: Axes, axes_num: int) -> Axes:
if not self.on_right(axes_num):
# secondary axes may be passed via ax kw
return self._get_ax_layer(ax)
if hasattr(ax, "right_ax"):
# if it has right_ax property, ``ax`` must be left axes
return ax.right_ax
elif hasattr(ax, "left_ax"):
# if it has left_ax property, ``ax`` must be right axes
return ax
else:
# otherwise, create twin axes
orig_ax, new_ax = ax, ax.twinx()
# TODO: use Matplotlib public API when available
new_ax._get_lines = orig_ax._get_lines # type: ignore[attr-defined]
# TODO #54485
new_ax._get_patches_for_fill = ( # type: ignore[attr-defined]
orig_ax._get_patches_for_fill # type: ignore[attr-defined]
)
# TODO #54485
orig_ax.right_ax, new_ax.left_ax = ( # type: ignore[attr-defined]
new_ax,
orig_ax,
)
if not self._has_plotted_object(orig_ax): # no data on left y
orig_ax.get_yaxis().set_visible(False)
if self.logy is True or self.loglog is True:
new_ax.set_yscale("log")
elif self.logy == "sym" or self.loglog == "sym":
new_ax.set_yscale("symlog")
return new_ax # type: ignore[return-value] <- this Unused "type: ignore" comment [unused-ignore] Since mypy doesn't find any issues with the return type, the type: ignore[return-value] is redundant and can be removed. |
mroeschke
approved these changes
Aug 19, 2024
Thanks @uditbaliyan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #59458
Addresses:
pandas.Timestamp
Added missing 'See Also' sections (SA01) for the following methods:
Documented missing parameters (PR01, PR07) for the following methods:
Removed
-i "pandas.Timestamp.combine PR01,SA01"
-i "pandas.Timestamp.ctime SA01"
-i "pandas.Timestamp.date SA01"
-i "pandas.Timestamp.fromordinal SA01"
-i "pandas.Timestamp.fromtimestamp PR01,SA01"
-i "pandas.Timestamp.month_name SA01"
-i "pandas.Timestamp.normalize SA01"
-i "pandas.Timestamp.quarter SA01"
-i "pandas.Timestamp.replace PR07,SA01"
-i "pandas.Timestamp.timestamp SA01"
-i "pandas.Timestamp.timetuple SA01"
-i "pandas.Timestamp.toordinal SA01"
-i "pandas.Timestamp.today SA01"
-i "pandas.Timestamp.to_period PR01,SA01"
-i "pandas.Timestamp.to_numpy PR01"
-i "pandas.Timestamp.to_julian_date SA01" \
from code_checks.sh