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

Apply the Black code style to the source code #95

Merged
merged 5 commits into from
Sep 29, 2021
Merged

Conversation

BoxiLi
Copy link
Member

@BoxiLi BoxiLi commented Sep 22, 2021

There are not many large-scale changes going on right now, except for the qutip5 updates, which I will sort out myself. So it seems a good time to do this? I applied black directly. Didn't check each file separately, but it looks good to me in general. Any caveat on doing this? @hodgestar

@BoxiLi
Copy link
Member Author

BoxiLi commented Sep 22, 2021

There is a check on Code Climatethat inconsistent with Black: Whitespace before ':'. It can be turned off if desired.

Copy link
Contributor

@hodgestar hodgestar left a comment

Choose a reason for hiding this comment

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

Looks great to me -- thank you for doing this.

Let's just turn off the CodeClimate check that conflicts.

@hodgestar
Copy link
Contributor

As a separate PR we should run black as part of our GitHub actions so that CI fails if black has not been applied.

@BoxiLi
Copy link
Member Author

BoxiLi commented Sep 26, 2021

  • Add the lint check to action
  • Disable the incompatible check in code climate E203
  • Add the max-length 79 configuration to pyproject.toml

I ignored code climate issues with "Avoid deeply nested control flow statements. ", which is unrelated to linting issues in this PR.

@BoxiLi BoxiLi merged commit 527c3c8 into qutip:master Sep 29, 2021
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