$ ./test/lint/lint-python.py
Skipping Python linting since flake8 is not installed.
$ flake8 --version
5.0.4 (mccabe: 0.7.0, pycodestyle: 2.9.1, pyflakes: 2.5.0) CPython 3.10.9 on Linux
If I try old lint-python.sh, it works.
$ ./test/lint/lint-python.py
Skipping Python linting since flake8 is not installed.
$ flake8 --version
5.0.4 (mccabe: 0.7.0, pycodestyle: 2.9.1, pyflakes: 2.5.0) CPython 3.10.9 on Linux
If I try old lint-python.sh, it works.
Also, what is the result of running
uname -a?
It's Linux on x86_64 (Gentoo).
Previously the check was done with command flake8, now it is done via import pkg_resources
Unrelated: You'll need the version specified in the script. Currently, flake8==4.0.1
Figured out what's happening. I have Python 3.8, 3.9 and 3.10 present in the system. The default is set to 3.8, but flake8 was installed only for 3.9 and 3.10. Also, flake8 5.0.4 works, but gives lots of E275 errors.
$ eselect python list
Available Python interpreters, in order of preference:
[1] python3.8
[2] python3.10
[3] python3.9
$ python --version
Python 3.8.15
$ sudo emerge -pv flake8
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] dev-python/flake8-5.0.4::gentoo USE="-doc -test" PYTHON_TARGETS="python3_9 python3_10 (-pypy3) -python3_8 -python3_11" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
$ python test/lint/lint-python.py
Skipping Python linting since flake8 is not installed.
$ python3.10 test/lint/lint-python.py
contrib/linearize/linearize-hashes.py:81:19: E275 missing whitespace after keyword
contrib/seeds/generate-seeds.py:73:23: E275 missing whitespace after keyword
contrib/seeds/generate-seeds.py:79:15: E275 missing whitespace after keyword
test/functional/feature_coinstatsindex.py:224:15: E275 missing whitespace after keyword
test/functional/feature_coinstatsindex.py:271:15: E275 missing whitespace after keyword
test/functional/feature_coinstatsindex.py:276:15: E275 missing whitespace after keyword
test/functional/feature_index_prune.py:65:19: E275 missing whitespace after keyword
test/functional/feature_index_prune.py:83:19: E275 missing whitespace after keyword
test/functional/feature_index_prune.py:90:19: E275 missing whitespace after keyword
test/functional/interface_usdt_utxocache.py:360:19: E275 missing whitespace after keyword
test/functional/interface_usdt_utxocache.py:361:19: E275 missing whitespace after keyword
test/functional/interface_usdt_validation.py:115:19: E275 missing whitespace after keyword
test/functional/mempool_fee_histogram.py:38:15: E275 missing whitespace after keyword
test/functional/mocks/invalid_signer.py:13:7: E275 missing whitespace after keyword
test/functional/mocks/signer.py:13:7: E275 missing whitespace after keyword
test/functional/p2p_addr_relay.py:52:15: E275 missing whitespace after keyword
test/functional/p2p_blocksonly.py:107:15: E275 missing whitespace after keyword
test/functional/p2p_getaddr_caching.py:63:15: E275 missing whitespace after keyword
test/functional/p2p_getaddr_caching.py:88:23: E275 missing whitespace after keyword
test/functional/p2p_getaddr_caching.py:89:23: E275 missing whitespace after keyword
test/functional/p2p_getaddr_caching.py:90:23: E275 missing whitespace after keyword
test/functional/p2p_getaddr_caching.py:122:15: E275 missing whitespace after keyword
test/functional/p2p_getaddr_caching.py:123:15: E275 missing whitespace after keyword
test/functional/p2p_getaddr_caching.py:124:15: E275 missing whitespace after keyword
test/functional/p2p_headers_sync_with_minchainwork.py:60:19: E275 missing whitespace after keyword
test/functional/p2p_headers_sync_with_minchainwork.py:72:19: E275 missing whitespace after keyword
test/functional/p2p_headers_sync_with_minchainwork.py:92:15: E275 missing whitespace after keyword
test/functional/p2p_message_capture.py:39:15: E275 missing whitespace after keyword
test/functional/p2p_message_capture.py:47:19: E275 missing whitespace after keyword
test/functional/rpc_blockchain.py:373:15: E275 missing whitespace after keyword
test/functional/rpc_rawtransaction.py:219:19: E275 missing whitespace after keyword
test/functional/rpc_rawtransaction.py:221:23: E275 missing whitespace after keyword
test/functional/rpc_rawtransaction.py:222:23: E275 missing whitespace after keyword
test/functional/rpc_rawtransaction.py:224:23: E275 missing whitespace after keyword
test/functional/rpc_rawtransaction.py:225:23: E275 missing whitespace after keyword
test/functional/rpc_rawtransaction.py:238:15: E275 missing whitespace after keyword
test/functional/rpc_rawtransaction.py:242:15: E275 missing whitespace after keyword
test/functional/rpc_scanblocks.py:49:15: E275 missing whitespace after keyword
test/functional/rpc_scanblocks.py:59:15: E275 missing whitespace after keyword
test/functional/rpc_scanblocks.py:63:15: E275 missing whitespace after keyword
test/functional/rpc_scanblocks.py:67:15: E275 missing whitespace after keyword
test/functional/rpc_scanblocks.py:71:15: E275 missing whitespace after keyword
test/functional/rpc_scanblocks.py:75:15: E275 missing whitespace after keyword
test/functional/rpc_scanblocks.py:92:15: E275 missing whitespace after keyword
test/functional/rpc_scanblocks.py:94:15: E275 missing whitespace after keyword
test/functional/test_framework/key.py:142:15: E275 missing whitespace after keyword
test/functional/test_framework/key.py:265:15: E275 missing whitespace after keyword
test/functional/test_framework/key.py:279:15: E275 missing whitespace after keyword
test/functional/test_framework/key.py:352:15: E275 missing whitespace after keyword
test/functional/test_framework/key.py:365:15: E275 missing whitespace after keyword
test/functional/test_framework/key.py:378:15: E275 missing whitespace after keyword
test/functional/test_framework/key.py:391:15: E275 missing whitespace after keyword
test/functional/test_framework/script.py:827:15: E275 missing whitespace after keyword
test/functional/test_framework/script.py:830:15: E275 missing whitespace after keyword
test/functional/test_framework/siphash.py:34:11: E275 missing whitespace after keyword
test/functional/test_framework/siphash.py:64:11: E275 missing whitespace after keyword
test/functional/wallet_avoidreuse.py:198:15: E275 missing whitespace after keyword
test/functional/wallet_backwards_compatibility.py:196:35: E275 missing whitespace after keyword
test/functional/wallet_backwards_compatibility.py:202:35: E275 missing whitespace after keyword
test/functional/wallet_backwards_compatibility.py:204:31: E275 missing whitespace after keyword
test/functional/wallet_backwards_compatibility.py:207:31: E275 missing whitespace after keyword
test/functional/wallet_bumpfee.py:560:11: E275 missing whitespace after keyword
test/functional/wallet_implicitsegwit.py:39:19: E275 missing whitespace after keyword
test/functional/wallet_importdescriptors.py:490:15: E275 missing whitespace after keyword
test/functional/wallet_importdescriptors.py:491:15: E275 missing whitespace after keyword
test/functional/wallet_reorgsrestore.py:97:15: E275 missing whitespace after keyword
test/functional/wallet_reorgsrestore.py:101:15: E275 missing whitespace after keyword
test/functional/wallet_send.py:282:15: E275 missing whitespace after keyword
test/functional/wallet_send.py:286:15: E275 missing whitespace after keyword
test/functional/wallet_signer.py:177:15: E275 missing whitespace after keyword
test/functional/wallet_signer.py:206:15: E275 missing whitespace after keyword
test/functional/wallet_signer.py:215:15: E275 missing whitespace after keyword
test/functional/wallet_signer.py:221:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:247:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:263:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:265:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:287:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:289:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:305:19: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:310:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:332:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:334:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:336:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:338:15: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:341:19: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:378:19: E275 missing whitespace after keyword
test/functional/wallet_taproot.py:386:15: E275 missing whitespace after keyword
You'll need the version specified in the script. Currently, flake8==4.0.1
Closing as this isn't an issue. If you want to run the linters, you need to use the same versions of dependencies as the CI. We cannot gaurantee that any other versions will "work".