Skip to content

Switch to using black for code formatting#171

Merged
manoelmarques merged 1 commit into
qiskit-community:mainfrom
manoelmarques:black
May 5, 2021
Merged

Switch to using black for code formatting#171
manoelmarques merged 1 commit into
qiskit-community:mainfrom
manoelmarques:black

Conversation

@manoelmarques
Copy link
Copy Markdown
Contributor

Summary

Follows the changes made in Qiskit/qiskit#6361

Details and comments

Copy link
Copy Markdown
Member

@woodsp-ibm woodsp-ibm left a comment

Choose a reason for hiding this comment

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

It seems fine - has some weird alterations like

        eigenstate_result.aux_operator_eigenvalues = raw_es_result.aux_operator_eigenvalues

to

        eigenstate_result.aux_operator_eigenvalues = (
            raw_es_result.aux_operator_eigenvalues
        )

that seemed to fit on the one line fine; but aside from these oddities in general things look ok

@mtreinish
Copy link
Copy Markdown
Collaborator

It seems fine - has some weird alterations like

        eigenstate_result.aux_operator_eigenvalues = raw_es_result.aux_operator_eigenvalues

to

        eigenstate_result.aux_operator_eigenvalues = (
            raw_es_result.aux_operator_eigenvalues
        )

that seemed to fit on the one line fine; but aside from these oddities in general things look ok

Yeah the black style choices can be a bit weird looking at times (I'm generally not a fan of it's style and probably wouldn't personally format code like it does). But the real advantage it offers is just removing code style and formatting as something humans need to worry about. It makes code formatting a simple and fast one line command prior you run prior to committing. So it just takes any questions out of the process.

@manoelmarques manoelmarques merged commit 8a88efc into qiskit-community:main May 5, 2021
@manoelmarques manoelmarques deleted the black branch May 5, 2021 17:15
Anthony-Gandon pushed a commit to Anthony-Gandon/qiskit-nature that referenced this pull request May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants