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

Actually Black format everything #3223

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

MicahGale
Copy link
Contributor

@MicahGale MicahGale commented Dec 13, 2024

Description

This is a follow-on to #3222 that actually formats everything with black.

Proposed way to merge.

  1. Review and approve Laid out infrastructure for switching to black formatting all code. #3222.
  2. Run black locally on develop and then compare with this PR. I think this is the only way to verify nothing was snuck in with so many changes.
  3. This will lead to a lot of merge conflicts for all open PRs. I would recommend that those with open PRs:
    1. Run black against their branch and commit.
    2. Merge in develop. This should eliminate almost all merge conflicts.

Fixes #2002 (actually implement.)

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@lewisgross1296
Copy link
Contributor

lewisgross1296 commented Jan 20, 2025

Wondering if this PR got lost over the holidays and new year. Is anyone opposed to this or does any of the leadership team have a strong opinion one way or the other? I do support black formatting, as I'm finding when I try to edit source code for a different PR, my black formatter is formatting previously merged code. Apparently black has a unique formatting choice (that can be tweaked with certain settings e.g. max line length), which is desirable to me to more easily prevent unwanted diffs in my PRs.

I can live with changing my formatter settings for openmc and manually formatting source code additions, but I think it would be cool to unify the formatting. We can always use the # fmt: off and #f mt: on if there's any parts that get less readable from the auto format.

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.

coding style for Python
2 participants