Skip to content

Commit

Permalink
Convert NamedTuple to dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
foriequal0 committed Nov 1, 2019
1 parent 73a1003 commit 7d32b2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions codechain/primitives/AssetAddress.py
@@ -1,15 +1,15 @@
import re
from dataclasses import dataclass
from typing import List
from typing import NamedTuple
from typing import Tuple
from typing import Union

from ..crypto import bech32_decode
from ..crypto import bech32_encode
from .HexString import H160


class MultiSig(NamedTuple):
@dataclass
class MultiSig:
n: int
m: int
pubkeys: List[H160]
Expand Down
5 changes: 3 additions & 2 deletions codechain/primitives/PlatformAddress.py
@@ -1,5 +1,5 @@
import re
import typing
from dataclasses import dataclass

from ..crypto import bech32_decode
from ..crypto import bech32_encode
Expand All @@ -8,7 +8,8 @@
from .HexString import H512


class PlatformAddress(typing.NamedTuple):
@dataclass
class PlatformAddress:
account_id: H160
value: str

Expand Down

0 comments on commit 7d32b2b

Please sign in to comment.