False positive (?) in lint-python-dead-code.sh #16906

issue laanwj openend this issue on September 18, 2019
  1. laanwj commented at 3:14 pm on September 18, 2019: member

    Travis reports a false positive on master at the moment:

    0test/functional/data/invalid_txs.py:217: unused variable 'DisabledOpcodeTemplates' (60% confidence)
    1
    2^---- failure generated from test/lint/lint-python-dead-code.sh
    

    I have to agree with the linter that it’s slightly confusing code, as DisabledOpcodeTemplates (introduced in 0c62e3aa73839e97e65a3155e06a98d84b700a1e, #14696) is not used directly, but the objects created here are definitely used in iter_all_templates by iterating over the subclasses.

    e.g.

     0 1$ test/functional/p2p_invalid_tx.py 
     22019-09-18T15:28:40.922000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_CAT
     32019-09-18T15:28:41.026000Z TestFramework (INFO): Reconnecting to peer    
     42019-09-18T15:28:41.078000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_SUBSTR
     52019-09-18T15:28:41.182000Z TestFramework (INFO): Reconnecting to peer                               
     62019-09-18T15:28:41.233000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_LEFT
     72019-09-18T15:28:41.338000Z TestFramework (INFO): Reconnecting to peer
     82019-09-18T15:28:41.389000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_RIGHT
     92019-09-18T15:28:41.494000Z TestFramework (INFO): Reconnecting to peer
    102019-09-18T15:28:41.545000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_INVERT
    112019-09-18T15:28:41.649000Z TestFramework (INFO): Reconnecting to peer
    122019-09-18T15:28:41.701000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_AND
    132019-09-18T15:28:41.805000Z TestFramework (INFO): Reconnecting to peer
    142019-09-18T15:28:41.856000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_OR
    152019-09-18T15:28:41.960000Z TestFramework (INFO): Reconnecting to peer
    162019-09-18T15:28:42.012000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_XOR
    172019-09-18T15:28:42.116000Z TestFramework (INFO): Reconnecting to peer
    182019-09-18T15:28:42.167000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_2MUL
    192019-09-18T15:28:42.271000Z TestFramework (INFO): Reconnecting to peer
    202019-09-18T15:28:42.322000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_2DIV
    212019-09-18T15:28:42.427000Z TestFramework (INFO): Reconnecting to peer
    222019-09-18T15:28:42.479000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_MUL
    232019-09-18T15:28:42.583000Z TestFramework (INFO): Reconnecting to peer
    24
  2. laanwj added the label Tests on Sep 18, 2019
  3. MarcoFalke closed this on Sep 18, 2019

  4. MarcoFalke closed this on Sep 18, 2019

  5. MarcoFalke commented at 6:57 pm on September 19, 2019: member
    @practicalswift The error message should probably say how to update the whitelist, no?
  6. fanquake referenced this in commit 04321494ae on Sep 20, 2019
  7. laanwj referenced this in commit f4beb4996d on Sep 25, 2019
  8. MarcoFalke referenced this in commit 4c4ff4911a on Sep 25, 2019
  9. sidhujag referenced this in commit 5ce21ba032 on Sep 26, 2019
  10. PierreRochard referenced this in commit b7d57c5e0f on Oct 12, 2019
  11. HashUnlimited referenced this in commit b71d3a234d on Nov 17, 2019
  12. UdjinM6 referenced this in commit 5dc0973ddd on Sep 10, 2021
  13. UdjinM6 referenced this in commit 651599dde1 on Sep 10, 2021
  14. UdjinM6 referenced this in commit 29caaf3ee7 on Sep 10, 2021
  15. UdjinM6 referenced this in commit 2d7ac34f20 on Sep 24, 2021
  16. UdjinM6 referenced this in commit 87631b95cf on Sep 24, 2021
  17. UdjinM6 referenced this in commit 7b8e019ceb on Sep 24, 2021
  18. UdjinM6 referenced this in commit f7ab87cb64 on Oct 4, 2021
  19. UdjinM6 referenced this in commit 621223e587 on Oct 4, 2021
  20. UdjinM6 referenced this in commit 849e9d055b on Oct 4, 2021
  21. UdjinM6 referenced this in commit dc14874d3e on Oct 5, 2021
  22. UdjinM6 referenced this in commit a8f615748c on Oct 5, 2021
  23. UdjinM6 referenced this in commit 313d79e319 on Oct 5, 2021
  24. kittywhiskers referenced this in commit d2040fa50f on Oct 12, 2021
  25. kittywhiskers referenced this in commit 13d1c77eea on Oct 12, 2021
  26. kittywhiskers referenced this in commit cbd5510338 on Oct 12, 2021
  27. pravblockc referenced this in commit df3a16c6ed on Nov 18, 2021
  28. pravblockc referenced this in commit a61d2b5fe2 on Nov 18, 2021
  29. pravblockc referenced this in commit 7cdb038a2b on Nov 18, 2021
  30. MarcoFalke locked this on Dec 16, 2021


laanwj MarcoFalke

Labels
Tests


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: 2024-11-17 15:12 UTC

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