Skip to content

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented Jan 15, 2022

Auto-format Python code according to black.

Checks docs, too.
This might not be the best idea, since some files like "first read"/"first write" use carefully crafted, short lines in code examples, so they can go side-by-side with C++ code on many screens.

Auto-format Python code according to `black`
electrons["position"]["x"].store_chunk([0, ], particlePos_x.shape, particlePos_x)
electrons["position"]["x"].store_chunk(
[
0,
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
0,
0

@ax3l ax3l changed the title Python: Apply "Black" Styling [WIP] Python: Apply "Black" Styling Jan 15, 2022
@franzpoeschel
Copy link
Contributor

This might not be the best idea, since some files like "first read"/"first write" use carefully crafted, short lines in code examples, so they can go side-by-side with C++ code on many screens.

Same issue then with the C++ reformatting? #1032
We could exempt the examples from reformatting in both PRs? Or even just specific examples.

@ax3l
Copy link
Member Author

ax3l commented Jan 21, 2022

At the moment, I am just concerned about:

Checks docs, too.

and I think we will serve these two files with an exception :) (have to check how to config that ^^)

I think the clang-format one does not reformat inline code in docs that is not included from example files elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants