Skip to content
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

CLN removing trailing commas #36101

Merged
merged 3 commits into from Sep 5, 2020

Conversation

sarthakvk
Copy link

@sarthakvk sarthakvk commented Sep 3, 2020

This PR is related to #35925, both current and new versions of black passes these formatting,
also I'd like to mention that there seem to be a reported bug in newer version of black which throws error after removing trailing comma from pandas/tests/scalar/timestamp/test_constructors.py that's why I didn't change this formatting.

      diff --git a/pandas/tests/scalar/timestamp/test_constructors.py b/pandas/tests/scalar/timestamp/test_constructors.py
index 316a299ba..c70eacdfa 100644
--- a/pandas/tests/scalar/timestamp/test_constructors.py
+++ b/pandas/tests/scalar/timestamp/test_constructors.py
@@ -267,7 +267,7 @@ class TestTimestampConstructors:
                 hour=1,
                 minute=2,
                 second=3,
-                microsecond=999999,
+                microsecond=999999
             )
         ) == repr(Timestamp("2015-11-12 01:02:03.999999"))
 
~

The workaround to this is after removing trailing comma from above code run black with --fast which will add trailing comma back again and and will not format afterwards on re-running black without --fast

"""

"""
""""""
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this docstring can be removed entirely if it's just empty anyway?

@MarcoGorelli
Copy link
Member

Thanks for looking into this, I remember getting some errors when running the new version of black on all the files

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.

looks good to me pending green

@MarcoGorelli
Copy link
Member

Can you merge master to get the CI green please?

@sarthakvk
Copy link
Author

Can you merge master to get the CI green please?

@MarcoGorelli I was wondering why CI isn't passing, I'll merge it.
Thanks

@simonjayhawkins simonjayhawkins added Clean Code Style Code style, linting, code_checks labels Sep 5, 2020
@simonjayhawkins simonjayhawkins added this to the 1.2 milestone Sep 5, 2020
@simonjayhawkins simonjayhawkins merged commit 70c056b into pandas-dev:master Sep 5, 2020
@simonjayhawkins
Copy link
Member

Thanks @sarthakchaudhary13

jbrockmendel pushed a commit to jbrockmendel/pandas that referenced this pull request Sep 8, 2020
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants