HomePhabricator

[electrum] don't use an alias for the OpCodes class

Description

[electrum] don't use an alias for the OpCodes class

Summary: The opcodes are defined as an IntEnum class in bitcoin.py. Renaming it to an all lowercase namespace makes it look like it is a module or a variable instance of the class (which does not make sense for an Enum class) as per PEP-8 naming conventions.

Test Plan:

python test_runner.py

Search for usages of the OpCodes enum in the codebase, make sure no other module imports it transitively via the transaction.py module.

grep -r "transaction.opcodes" .
grep -r "from transaction import opcodes" .
grep -r "from transaction import *" .
grep -r "from .* import OpCodes as " .

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14431

Details

Provenance
PiRKAuthored on Aug 30 2023, 06:16
PiRKPushed on Aug 30 2023, 15:34
Reviewer
Restricted Project
Differential Revision
D14431: [electrum] don't use an alias for the OpCodes class
Parents
rABCec56c4095d82: [Chronik] Shut down node after errors in merge operators gracefully
Branches
Unknown
Tags
Unknown