Switch to using black for code formatting#81
Switch to using black for code formatting#81manoelmarques merged 1 commit intoqiskit-community:mainfrom
Conversation
|
This is a disaster! I can't say we had a very well formatted code, but this is terrible. input_grad = grad_output.transpose(0, 1) @ input_grad.transpose(0, 1)now: input_grad = grad_output.transpose(0, 1) @ input_grad.transpose(
0, 1
)Or: weights_grad = weights_grad.to_dense() # this should be eventually removedit is weights_grad = (
weights_grad.to_dense()
) # this should be eventually removedOr: parameterized_circuit = self._quantum_instance.transpile(parameterized_circuit)[0]replaced with parameterized_circuit = self._quantum_instance.transpile(
parameterized_circuit
)[0]and so on and so on... |
|
Any ideas why |
|
Terra changed to 105 from 100 in their PR. I don't know why but would think it has to do on how black formatted code which may have increased de size of the code in one line. |
|
This issue in Terra has a note as to the line length of 105 Qiskit/qiskit#5883 I agree it does not do a great job in some places - I made a comment in the equivalent PR in Nature. |
|
Thanks for pointing out to the Nature's PR. I agree with @mtreinish in general. Well, of course we get rid of any formatting questions but at what a cost. |
This is the answer from Qiskit/qiskit#5883:
|
Summary
Follows the changes made in Qiskit/qiskit#6361
Details and comments