Skip to content

Commit 6752f3b

Browse files
committed
Use __all__ in bitcoin.messages
First step in getting rid of the from foo import *'s [ yapified by gitreformat (github/ghtdak) on Mon Nov 30 21:11:12 2015 ]
1 parent 5d1829a commit 6752f3b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

bitcoin/messages.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
else:
2222
import cStringIO as io
2323

24+
# Bad practice, so we have a __all__ at the end; this should be cleaned up
25+
# later.
2426
from bitcoin.core import *
2527
from bitcoin.core.serialize import *
2628
from bitcoin.net import *
@@ -444,3 +446,25 @@ def __repr__(self):
444446
messagemap = {}
445447
for cls in msg_classes:
446448
messagemap[cls.command] = cls
449+
450+
__all__ = ('MSG_TX',
451+
'MSG_BLOCK',
452+
'MSG_FILTERED_BLOCK',
453+
'MsgSerializable',
454+
'msg_version',
455+
'msg_verack',
456+
'msg_addr',
457+
'msg_alert',
458+
'msg_inv',
459+
'msg_getdata',
460+
'msg_getblocks',
461+
'msg_getheaders',
462+
'msg_headers',
463+
'msg_tx',
464+
'msg_block',
465+
'msg_getaddr',
466+
'msg_ping',
467+
'msg_pong',
468+
'msg_mempool',
469+
'msg_classes',
470+
'messagemap',)

0 commit comments

Comments
 (0)