Add type annotations for nodes, node handles and assets
Add type annotations for TestTools' types:
- for external use (for testers):
-
AnyAsset
(Asset.Hive
,Asset.Hbd
,Asset.Vest
and their testnet alternatives) -
AnyLocalNodeHandle
asAnyLocalNode
(ApiNode
,InitNode
,WitnessNode
orRawNode
) -
AnyNodeHandle
asAnyNode
(all above and alsoRemoteNode
)
-
- for internal use (inside TestTools):
AnyLocalNode
AnyNode
So now it can be used with syntax:
from __future__ import annotations # Required in Python older than 3.10 (currently we use 3.8)
import test_tools as tt
def transfer(node: tt.AnyLocalNode, amount: tt.AnyAsset):
...
Reviewers: