test: remove type: comments in favour of actual annotations

Now that we require Python 3.6+, we should be using variable type
annotations directly rather than # type: comments.

Also takes care of the discarded value issue in p2p_message_capture.py.
See: https://github.com/bitcoin/bitcoin/pull/19509/files#r571674446.
This commit is contained in:
fanquake committed 2021-02-08 13:24:44 +08:00
1 parent cf26ca3911
commit 9913419cc9
3 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ class BadTxTemplate:
__metaclass__ = abc.ABCMeta
# The expected error code given by bitcoind upon submission of the tx.
reject_reason = "" # type: Optional[str]
reject_reason: Optional[str] = ""
# Only specified if it differs from mempool acceptance error.
block_reject_reason = ""