Enable flake8 rule E225 which checks for missing whitespace around op… #14534

pull jbampton wants to merge 1 commits into bitcoin:master from jbampton:flake8-fix-E225 changing 24 files +52 −51
  1. jbampton commented at 10:16 PM on October 20, 2018: contributor

    …erators

    Lint Python code for rule E225

  2. jbampton force-pushed on Oct 20, 2018
  3. in .gitignore:120 in 74f4e2d648 outdated
     115 | @@ -116,3 +116,5 @@ test/cache/*
     116 |  
     117 |  libbitcoinconsensus.pc
     118 |  contrib/devtools/split-debug.sh
     119 | +
     120 | +.idea
    


    practicalswift commented at 11:57 PM on October 20, 2018:
  4. fanquake added the label Tests on Oct 20, 2018
  5. practicalswift commented at 12:00 AM on October 21, 2018: contributor

    ACK 74f4e2d648eb40dd2315b46d87d6824f9f419e56 assuming nit is addressed and squash :-)

  6. Enable flake8 rule E225 which checks for missing whitespace around operators
    Lint Python code for rule E225
    0ad199b543
  7. jbampton force-pushed on Oct 21, 2018
  8. jbampton commented at 1:25 AM on October 21, 2018: contributor

    Hey @practicalswift the nit is fixed and now squashed 👍

  9. DrahtBot commented at 3:45 AM on October 21, 2018: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->Reviewers, this pull request conflicts with the following ones:

    • #14296 ([wallet] Remove addwitnessaddress by jnewbery)
    • #14066 (gitian-linux: Build binaries for 64-bit POWER by luke-jr)
    • #13998 (Scripts and tools: gitian-build.py improvements and corrections by hebasto)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  10. DrahtBot cross-referenced this on Oct 21, 2018 from issue [wallet] Remove addwitnessaddress by jnewbery
  11. DrahtBot cross-referenced this on Oct 21, 2018 from issue gitian-linux: Build binaries for 64-bit POWER by luke-jr
  12. DrahtBot cross-referenced this on Oct 21, 2018 from issue Scripts and tools: gitian-build.py improvements and corrections by hebasto
  13. practicalswift commented at 10:09 AM on October 21, 2018: contributor

    ACK 0ad199b543465f6aead05ee9014907eca36049e5

    Nice to never have to think about or comment on this ever again in future code reviews thanks to this check: review automation FTW :-)

  14. Empact commented at 11:08 PM on October 21, 2018: member

    utACK 0ad199b changes are whitespace only (https://github.com/bitcoin/bitcoin/pull/14534/files?w=1), the result is easier to read and the practice is automatically enforced

  15. ken2812221 commented at 11:49 PM on October 21, 2018: contributor

    It would be better to use scripted-diff for this kind of change. Use autopep8 or something else can auto format.

  16. jbampton commented at 8:08 AM on October 22, 2018: contributor

    Hey everyone, I did use autopep8 for this.

    From the project root directory the command I ran was:

    autopep8 --in-place --select=E225 -r .
    

    I would be happy to add other flake8 checks if you want to this pull request.

    autopep8 uses pycodestyle

    https://pep8.readthedocs.io/en/latest/intro.html#error-codes

    Here is the link to autopep8:

    https://github.com/hhatto/autopep8

  17. ken2812221 commented at 11:58 AM on October 22, 2018: contributor

    What I mean is writing the commands you were using into the commit message by scripted-diff. Then travis-ci will run the commands again to check if it is the same. So reviewers won't have to run the commands manually on their own computer to check if the change is correct or not.

    For example (Haven't tested):

    -BEGIN VERIFY SCRIPT-
    pip3 install --user autopep8
    autopep8 --in-place --select=E225 -r .
    -END VERIFY SCRIPT-
    
  18. jbampton commented at 1:20 PM on October 22, 2018: contributor

    Hey @ken2812221 thanks for explaining the process further.

    Does that mean you want me to commit again with a scripted diff ?

  19. promag commented at 6:16 PM on October 22, 2018: member

    How can we ensure other pulls don't break master if merged after this?

    +1 scripted diff.

    Edit: @ken2812221 install in the script?

  20. ken2812221 commented at 1:09 AM on October 23, 2018: contributor

    @jbampton You can git commit --amend to rewrite the commit message and force push it. @promag Yes, I assume travis does not have autopep8 installed. Also we don't want to change travis script. I think this is the only way to install it.

  21. MarcoFalke commented at 8:30 PM on October 23, 2018: member

    Both variants are allowed in python and the whitespace is not really "missing". Tend to NACK, as I don't see the advantage of doing this code churn for everyone.

  22. MarcoFalke commented at 8:30 PM on October 23, 2018: member

    See also #14540

  23. DrahtBot commented at 1:26 PM on October 24, 2018: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase

  24. DrahtBot added the label Needs rebase on Oct 24, 2018
  25. MarcoFalke commented at 3:41 PM on October 26, 2018: member

    Trivial pull request still needs rebase. Closing for now.

  26. MarcoFalke closed this on Oct 26, 2018

  27. jbampton deleted the branch on Oct 14, 2019
  28. laanwj removed the label Needs rebase on Oct 24, 2019
  29. bitcoin locked this on Dec 16, 2021
Labels
Linked (view graph)
#8994 Testchains: Introduce custom chain whose constructor... #10595 Bugfix: RPC/Mining: Use pre-segwit sigops and limits, when working with non-segwit GBT clients#11413 [wallet] [rpc] sendtoaddress/sendmany: Add explicit feerate option#12096 [rpc] [wallet] Allow specifying the output index when using bumpfee#12134 Build previous releases and run functional tests #12419 Force distinct destinations in CWallet::CreateTransaction#12656 Add scripts for doing gitian builds on any platform using VirtualBox + Vagrant + Packer#12911 wallet: Show fee in results for signrawtransaction* for segwit inputs#13315 configurable ZMQ message limit#13357 Define SIGHASH_MASK in validation and determine the use of SIGHASH_SINGLE in signing#13381 RPC: creates possibility to preserve labels on importprivkey#13541 wallet/rpc: sendrawtransaction maxfeerate#13693 [test] Add coverage to estimaterawfee and estimatesmartfee#13728 lint: Run the CI lint stage on mac#13746 -masterdatadir for datadir bootstrapping#13926 [Tools] bitcoin-wallet - a tool for creating and managing wallets offline#13932 Additional utility RPCs for PSBT#13972 Remove 16 bits from versionbits signalling system (BIP320)#14021 Import key origin data through descriptors in importmulti#14060 ZMQ: add options to configure outbound message high water mark, aka SNDHWM#14075 Import watch only pubkeys to the keypool if private keys are disabled#14092 tests: Dry run bench_bitcoin as part "make check" to allow for quick identification of assertion/sanitizer failures in benchmarking code#14121 Index for BIP 157 block filters#14150 Add key origin support to descriptors#14194 Annotate unused parameters with [[maybe_unused]]#14197 [psbt] Convert non-witness UTXOs to witness if witness sig created#14320 [bugfix] wallet: Fix duplicate fileid detection#14350 Add WalletLocation class#14353 REST: add blockhash call, fetch blockhash by height#14356 fix converttopsbt permitsigdata arg, add basic test#14365 tests: Add Python dead code linter (vulture) to Travis#14380 fix assert crash when specified change output spend size is unknown#14391 tests: Make Travis linting output less verbose#14410 rpcwallet: 'ischange' field for 'getaddressinfo' RPC#14411 [wallet] Restore ability to list incoming transactions by label#14416 Fix OSX dmg issue (10.12 to 10.14)#14417 Fix listreceivedbyaddress not taking address as a string#14430 Add more property based tests for basic bitcoin data structures#14433 Add checksum in gitian build scripts for ossl#14453 rpc: Fix wallet unload during walletpassphrase timeout#14454 Add SegWit support to importmulti#14457 test: add invalid tx templates for use in functional tests#14459 docs: Consistent type names in RPC help descriptions#14468 [wallet] Deprecate generate RPC method#14476 RPC method 'encodescript'#14481 Add P2SH-P2WSH support to listunspent RPC#14489 refactor: Drop boost::thread and boost::chrono#14494 Error if # is used in rpcpassword in conf#14504 tests: show the progress of functional tests#14507 net: avoid being disconnected from pruned nodes when syncing up#14518 rpc: Always throw in getblockstats if -txindex is required#14519 tests: add utility to easily profile node performance with perf#14522 tests: add invalid P2P message tests#14530 Use RPCHelpMan to generate RPC doc strings#14531 Replace fs::relative call with custom GetRelativePath#14539 add Apple SDK download to gitian-build.py#14540 Enable flake8 rule E231.

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-20 06:54 UTC