From 7037bb0cfafbceb98da478a9d182aa0c43162eb2 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Sat, 1 Jun 2019 03:54:40 +0300 Subject: using dataclasses instead of typed namedtuple --- genmap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'genmap.py') diff --git a/genmap.py b/genmap.py index b601d007..60b2bc9b 100755 --- a/genmap.py +++ b/genmap.py @@ -23,15 +23,16 @@ import sys import textwrap +import dataclasses from typing import List -from typing import NamedTuple import mako.template # ===== -class _KeyMapping(NamedTuple): +@dataclasses.dataclass(frozen=True) +class _KeyMapping: kvmd_code: int arduino_hid_key: str web_key: str -- cgit v1.2.3