trivial: fix various pyflakes/vulture warnings #10881

pull eklitzke wants to merge 1 commits into bitcoin:master from eklitzke:vulture changing 13 files +22 −40
  1. eklitzke commented at 7:41 AM on July 19, 2017: contributor

    I am trying to learn my way around the Bitcoin code, and I decided to try to fix some minor errors reported by pyflakes/vulture. Most of these are just getting rid of unused variables.

  2. trivial: fix various pyflakes/vulture warnings 8064f7abe6
  3. practicalswift commented at 8:10 AM on July 19, 2017: contributor

    Concept ACK. Thanks for doing these uncontroversial cleanups.

    Please note that the changes in this PR are partly overlapping with #10781. Would you mind reviewing #10781?

    A minor nit: The changes made to socks5.py are whitespace only changes. According to the developer notes of the projects these changes should probably be excluded.

  4. jonasschnelli assigned MarcoFalke on Jul 19, 2017
  5. jonasschnelli unassigned MarcoFalke on Jul 19, 2017
  6. jonasschnelli requested review from MarcoFalke on Jul 19, 2017
  7. jonasschnelli added the label Tests on Jul 19, 2017
  8. in test/functional/rawtransactions.py:66 in 8064f7abe6
      62 | @@ -63,7 +63,7 @@ def run_test(self):
      63 |          addr2Obj = self.nodes[2].validateaddress(addr2)
      64 |  
      65 |          mSigObj = self.nodes[2].addmultisigaddress(2, [addr1Obj['pubkey'], addr2Obj['pubkey']])
      66 | -        mSigObjValid = self.nodes[2].validateaddress(mSigObj)
      67 | +        assert self.nodes[2].validateaddress(mSigObj)
    


    MarcoFalke commented at 6:20 PM on August 9, 2017:

    IIRC, this returns a dict and you'd need to assert on the value of the "isvalid" key.

  9. MarcoFalke commented at 6:27 PM on August 9, 2017: member

    utACK 8064f7abe6e6c99369fb9bde8190e766f5fa1dc2

  10. in test/functional/test_framework/script.py:17 in 8064f7abe6
      13 | @@ -14,8 +14,7 @@
      14 |  import sys
      15 |  bchr = chr
      16 |  bord = ord
      17 | -if sys.version > '3':
      18 | -    long = int
      19 | +if sys.version_info.major == 3:
    


    jnewbery commented at 7:44 PM on August 9, 2017:

    functional tests always run in Python 3. I think you can remove support for 2 entirely from this module.

  11. in test/functional/p2p-versionbits-warning.py:39 in 8064f7abe6
      35 | @@ -36,7 +36,7 @@ def __init__(self):
      36 |      def setup_network(self):
      37 |          self.alert_filename = os.path.join(self.options.tmpdir, "alert.txt")
      38 |          # Open and close to create zero-length file
      39 | -        with open(self.alert_filename, 'w', encoding='utf8') as _:
      40 | +        with open(self.alert_filename, 'w', encoding='utf8'):
    


    jnewbery commented at 7:45 PM on August 9, 2017:
  12. jnewbery commented at 7:46 PM on August 9, 2017: member

    Looks good. Agree that #10781 should go in first and this be rebased on top of it.

    Thanks for your contribution!

  13. MarcoFalke commented at 10:14 AM on August 30, 2017: member

    @eklitzke Needs rebase

  14. MarcoFalke closed this on Sep 13, 2017

  15. MarcoFalke commented at 5:17 PM on September 13, 2017: member

    Closing for now due to inactivity. Let me know to reopen.

  16. eklitzke deleted the branch on Mar 4, 2018
  17. meshcollider added the label Up for grabs on Mar 7, 2018
  18. meshcollider removed the label Up for grabs on Mar 7, 2018
  19. DrahtBot 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-05-02 03:15 UTC

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