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
2021-02-08 10:24:50 +08:00
parent cf26ca3911
commit 9913419cc9
3 changed files with 7 additions and 7 deletions

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 = ""