Page MenuHomePhabricator

[lint] remove shebangs from python files that are not scripts
AbandonedPublic

Authored by PiRK on Feb 13 2024, 11:54.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

This diff remove shebangs from python modules that are supposed to be imported rather than executed on their own.

For now this doesn't touch the individual functional tests, that are technically standalone but are always executed via test_runner.py with the python interpreter explicitely used (python <path>.py). This can be done in a separate diff, as it also involves changing the file permissions.

Depends on D15432

Test Plan

This will be covered by a new linter that I'm working on locally. Just check that the change makes sense and that all the files touched here don't have executable permission.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Errors
SeverityLocationCodeMessage
Errorchronik/chronik-plugin-impl/src/token.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errorchronik/chronik-plugin-impl/src/tx.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errorchronik/chronik-plugin-impl/tests/test_script_to_py.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errorchronik/chronik-plugin-impl/tests/test_tx_to_py.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errorcontrib/buildbot/shieldio.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errorcontrib/buildbot/test/abcbot_fixture.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errorelectrum/scripts/util.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/data/invalid_txs.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/address.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/authproxy.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/avatools.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/blocktools.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/cashaddr.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/chronik/alp.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/chronik/client.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/chronik/slp.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/chronik/test_data.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/chronik/token_tx.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/coverage.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/descriptors.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/muhash.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/netutil.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/ripemd160.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/script.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Errortest/functional/test_framework/siphash.py:PYTHON_SHEBANG1Missing or unexpected shebang.
Unit
No Test Coverage
Build Status
Buildable 27103
Build 53772: Build Diffelectrum-tests · chronik-client-integration-tests · check-buildbot · build-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang · build-chronik-plugins · build-chronik
Build 53771: arc lint + arc unit

Event Timeline

PiRK requested review of this revision.Feb 13 2024, 11:54
PiRK planned changes to this revision.Feb 13 2024, 12:09

This conflicts with the existing linter. I need to figure out a better strategy for transitioning to the new linter.