Skip to content

DOC: ran blacken docs tool and checked output to improve formatting #36777 #36802

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

Conversation

maria-ilie
Copy link
Contributor

For task #36777
Ran blacken-tools on user_guide/10min.rst, user_guide/advanced.rst, basics.rst

@MarcoGorelli
Copy link
Member

MarcoGorelli commented Oct 2, 2020

Thanks @maria-ilie ! This looks correct, it's just that E203 needs to be added to the ignore list for [flake8-rst]

Could you make the following change to setup.cfg as well? I think it's fine if it's part of this same pull request

diff --git a/setup.cfg b/setup.cfg
index 73986f692..eb2efb937 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -40,7 +40,9 @@ bootstrap =
     np  # avoiding error when importing again numpy or pandas
     pd  # (in some cases we want to do it to show users)
 ignore = E402,  # module level import not at top of file
+         E203,  # space before : (needed for how black formats slicing)
          W503,  # line break before binary operator
+         W504,  # line break after binary operator
          # Classes/functions in different blocks can generate those errors
          E302,  # expected 2 blank lines, found 0
          E305,  # expected 2 blank lines after class or function definition, found 0

(please do ask if you want/need help)

@erfannariman
Copy link
Member

Just to be sure we don't get any conflicts, I edited 10min.rst on #36780

@dsaxton dsaxton changed the title ran blacken docs tool and checked output to improve formatting #36777 DOC: ran blacken docs tool and checked output to improve formatting #36777 Oct 2, 2020
@dsaxton dsaxton added the Docs label Oct 2, 2020
@dsaxton
Copy link
Member

dsaxton commented Oct 2, 2020

Thanks @maria-ilie for the PR, can you merge master to fix the conflict?

@jbrockmendel jbrockmendel added the Code Style Code style, linting, code_checks label Oct 3, 2020
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 for updating, there's just one small thing which is causing the automated checks to fail

Comment on lines +670 to +672
df = pd.DataFrame(
{"id": [1, 2, 3, 4, 5, 6], "raw_grade": ["a", "b", "b", "a", "a", "e"]}
)
Copy link
Member

@MarcoGorelli MarcoGorelli Oct 4, 2020

Choose a reason for hiding this comment

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

Looks like this block got extra-indented by one space, this is causing the CI error, could you move it back?

Copy link
Member

@dsaxton dsaxton 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, just one tiny nitpick. Also merging master should fix the CI.

@dsaxton dsaxton merged commit 32d79ef into pandas-dev:master Oct 5, 2020
@dsaxton
Copy link
Member

dsaxton commented Oct 5, 2020

Thanks @maria-ilie

@maria-ilie
Copy link
Contributor Author

Thanks so much for reviewing!

@maria-ilie maria-ilie deleted the fixing_code_style_in_documentation branch October 5, 2020 02:10
@MarcoGorelli
Copy link
Member

Happy to help, let us know if you'd like any help/mentoring with other issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants