Remove assigned but never used local variables. Enable Travis checking for unused local variables.
Remove assigned but never used local variables. Enable Travis checking for unused local variables. #12284
pull practicalswift wants to merge 2 commits into bitcoin:master from practicalswift:remove-assigned-but-never-used-local-variables changing 6 files +19 −18-
practicalswift commented at 11:06 AM on January 28, 2018: contributor
- fanquake added the label Tests on Jan 28, 2018
- fanquake requested review from jnewbery on Jan 29, 2018
-
promag commented at 1:21 PM on January 29, 2018: member
utACK 3f281a8.
-
jnewbery commented at 2:16 PM on January 29, 2018: member
Seems reasonable. On master:
→ flake8 --select F841 test/functional/feature_block.py test/functional/feature_block.py:661:9: F841 local variable 's' is assigned to but never used test/functional/feature_block.py:698:9: F841 local variable 'b51' is assigned to but never used test/functional/feature_block.py:816:9: F841 local variable 'b58' is assigned to but never used test/functional/feature_block.py:823:9: F841 local variable 'b59' is assigned to but never used test/functional/feature_block.py:864:9: F841 local variable 'b62' is assigned to but never used test/functional/feature_block.py:1091:9: F841 local variable 'b74' is assigned to but never used test/functional/feature_block.py:1104:9: F841 local variable 'b75' is assigned to but never used test/functional/feature_block.py:1115:9: F841 local variable 'b76' is assigned to but never usedHowever, I've completely refactored this test in #11773 (which builds on #11771). My preference would be for those to be reviewed and merged.
I think removing all 'unused variable' warnings and enforcing F841 in our travis linter is a good longer term goal, but I'm concept NACKish on PRs that just fix style in individual files.
- practicalswift force-pushed on Jan 29, 2018
- practicalswift force-pushed on Jan 29, 2018
- practicalswift renamed this:
tests: Remove assigned but never used local variables
Remove assigned but never used local variables
on Jan 29, 2018 - practicalswift renamed this:
Remove assigned but never used local variables
Remove assigned but never used local variables. Enable Travis checking for unused local variables.
on Jan 29, 2018 -
practicalswift commented at 2:53 PM on January 29, 2018: contributor
@jnewbery Good point. Now fixing it globally and enabling Travis CI checking via
contrib/devtools/lint-python.sh. If your PR:s are merged before this PR I'll rebase on top of them.Please re-review :-)
-
practicalswift commented at 4:21 PM on January 29, 2018: contributor
-
jnewbery commented at 4:41 PM on January 29, 2018: member
- practicalswift force-pushed on Feb 8, 2018
-
practicalswift commented at 4:04 PM on February 8, 2018: contributor
Rebased on top of
masternow that #12295 has been merged! :-) - practicalswift force-pushed on Mar 11, 2018
- fanquake requested review from MarcoFalke on Mar 14, 2018
-
MarcoFalke commented at 1:29 PM on March 18, 2018: member
I will look at this after #11773 is merged.
-
Remove assigned but never used local variables 169f3e8637
- practicalswift force-pushed on Mar 29, 2018
-
practicalswift commented at 3:48 PM on March 29, 2018: contributor
#11773 is now merged. Please re-review :-)
-
MarcoFalke commented at 3:51 PM on March 29, 2018: member
utACK 22d1bd1914651f3c00739652471aabf5374ef092
-
in contrib/devtools/lint-python.sh:25 in 22d1bd1914 outdated
21 | @@ -22,6 +22,7 @@ 22 | # E275 missing whitespace after keyword 23 | # E304 blank lines found after function decorator 24 | # E306 expected 1 blank line before a nested definition 25 | +# F401: module imported but unused
jnewbery commented at 3:54 PM on March 29, 2018:This has snuck in somehow. Please remove! (F401 is documented lower down in the right place)
practicalswift commented at 4:02 PM on March 29, 2018:Oh, thanks. Now fixed.
jnewbery commented at 3:54 PM on March 29, 2018: memberutACK 22d1bd1914651f3c00739652471aabf5374ef092 after removing the stray comment in lint-python.sh
practicalswift force-pushed on Mar 29, 2018practicalswift commented at 4:02 PM on March 29, 2018: contributorUpdated. Please re-review :-)
practicalswift force-pushed on Mar 29, 2018Enable flake8 warning F841 ("local variable 'foo' is assigned to but never used") ea04bf7862practicalswift force-pushed on Mar 29, 2018jnewbery commented at 5:24 PM on March 29, 2018: memberutACK ea04bf786263eb0c933648bce43627c0de4d84ef
MarcoFalke commented at 5:25 PM on March 29, 2018: memberutACK ea04bf786263eb0c933648bce43627c0de4d84ef
MarcoFalke merged this on Apr 1, 2018MarcoFalke closed this on Apr 1, 2018MarcoFalke referenced this in commit fa5825d610 on Apr 1, 2018jasonbcox referenced this in commit 4afd5d82e9 on Aug 9, 2019PastaPastaPasta referenced this in commit f1b26d5fbe on Sep 27, 2020PastaPastaPasta referenced this in commit 1b4300ffdb on Oct 22, 2020PastaPastaPasta referenced this in commit 7de10e4737 on Oct 27, 2020practicalswift deleted the branch on Apr 10, 2021gades referenced this in commit ba2ba94022 on Apr 20, 2022DrahtBot locked this on Aug 16, 2022
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-16 15:15 UTC
More mirrored repositories can be found on mirror.b10c.me