[Trivial] Fix formatting issue on wallet_listreceivedby #12644

pull NicolasDorier wants to merge 1 commits into bitcoin:master from NicolasDorier:trivia changing 1 files +3 −3
  1. NicolasDorier commented at 4:55 AM on March 8, 2018: contributor

    Fix two formatting issue nits of @luke-jr introduced by https://github.com/bitcoin/bitcoin/pull/9991

  2. [Trivial] Fix formatting issue on wallet_listreceivedby ac9df9226c
  3. randolf approved
  4. randolf commented at 5:13 AM on March 8, 2018: contributor

    This improves consistency of coding style (e.g., to be consistent with code immediately above).

  5. fanquake added the label Tests on Mar 8, 2018
  6. in test/functional/wallet_listreceivedby.py:55 in ac9df9226c
      49 | @@ -50,9 +50,9 @@ def run_test(self):
      50 |                              {"address": empty_addr},
      51 |                              {"address": empty_addr, "account": "", "amount": 0, "confirmations": 0, "txids": []})
      52 |  
      53 | -        #Test Address filtering
      54 | -        #Only on addr
      55 | -        expected = {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]}
      56 | +        # Test Address filtering
      57 | +        # Only on addr
      58 | +        expected = {"address": addr, "account": "", "amount": Decimal("0.1"), "confirmations": 10, "txids": [txid, ]}
    


    MarcoFalke commented at 2:48 PM on March 8, 2018:

    Must remove the comma, otherwise reformatting with yapf forces a new line.

  7. in test/functional/wallet_listreceivedby.py:57 in ac9df9226c
      55 | -        expected = {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]}
      56 | +        # Test Address filtering
      57 | +        # Only on addr
      58 | +        expected = {"address": addr, "account": "", "amount": Decimal("0.1"), "confirmations": 10, "txids": [txid, ]}
      59 |          res = self.nodes[1].listreceivedbyaddress(minconf=0, include_empty=True, include_watchonly=True, address_filter=addr)
      60 |          assert_array_result(res, {"address":addr}, expected)
    


    MarcoFalke commented at 2:48 PM on March 8, 2018:

    still wrong formatting in this line

  8. MarcoFalke commented at 2:50 PM on March 8, 2018: member

    Hmm, this will lead to endless discussions.

    It seems there are some proponents of flake8 (e.g. @jnewbery uses it to format files after an edit), so I wouldn't mind if we just did a reformat of the whole python code to normalize the coding style and then enforce it and never worry about it again.

  9. NicolasDorier commented at 7:18 PM on March 8, 2018: contributor

    Should I fix this again the formatting or close this and have big reformat later?

  10. MarcoFalke commented at 8:09 PM on March 8, 2018: member

    Yes, I'd prefer one large commit that changes only ignorable white space. I.e. git diff --ignore-all-space returns an empty string.

  11. NicolasDorier closed this on Mar 8, 2018

  12. jnewbery commented at 4:09 PM on March 9, 2018: member

    Not worth fixing in a separate PR in my opinion.

    I wouldn't mind if we just did a reformat of the whole python code to normalize the coding style

    This would be a huge PR causing lots of rebases, so I'm not sure if it's worth it. If we do it, we should add more of the flake8 rules in https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/lint-python.sh to ensure that format rules are maintained.

  13. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me