Skip to content

DOC: Add missing single quote to Timestamp.tz_localize #59472

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 4 commits into from
Aug 11, 2024

Conversation

rob-sil
Copy link
Contributor

@rob-sil rob-sil commented Aug 10, 2024

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@rob-sil rob-sil requested a review from MarcoGorelli as a code owner August 10, 2024 14:19
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rob-sil

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, i was sure the ci failure wouldn't been unrelated, but it appears not to be so:

=================================== FAILURES ===================================
_________________ test_nat_doc_strings[Timestamp.tz_localize] __________________
[gw3] linux -- Python 3.11.9 /home/runner/micromamba/envs/test/bin/python3.11

compare = (<class 'pandas._libs.tslibs.timestamps.Timestamp'>, 'tz_localize')

    @pytest.mark.parametrize(
        "compare",
        (
            _get_overlap_public_nat_methods(Timestamp, True)
            + _get_overlap_public_nat_methods(Timedelta, True)
        ),
        ids=lambda x: f"{x[0].__name__}.{x[1]}",
    )
    def test_nat_doc_strings(compare):
        # see gh-17327
        #
        # The docstrings for overlapping methods should match.
        klass, method = compare
        klass_doc = getattr(klass, method).__doc__
    
        if klass == Timestamp and method == "isoformat":
            pytest.skip(
                "Ignore differences with Timestamp.isoformat() as they're intentional"
            )
    
        if method == "to_numpy":
            # GH#44460 can return either dt64 or td64 depending on dtype,
            #  different docstring is intentional
            pytest.skip(f"different docstring for {method} is intentional")
    
        nat_doc = getattr(NaT, method).__doc__
>       assert klass_doc == nat_doc
E       AssertionError

pandas/tests/scalar/test_nat.py:335: AssertionError

could you fix it up please

@rob-sil
Copy link
Contributor Author

rob-sil commented Aug 11, 2024

@MarcoGorelli good catch! Sorry about that. Found a couple more cases of that same line.

@rob-sil rob-sil requested a review from MarcoGorelli August 11, 2024 00:17
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @rob-sil

@MarcoGorelli MarcoGorelli merged commit 4cb55e5 into pandas-dev:main Aug 11, 2024
47 checks passed
shreyas-dev pushed a commit to shreyas-dev/pandas that referenced this pull request Aug 13, 2024
…59472)

* Add missing single quote to  docstring

* More missing single quotes

* Clean up a print statement

Update docstring for utcoffset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants