Using NewType instead of TypeAlias (#652)

pull/632/head^2
Tobi 1 year ago committed by GitHub
parent 61ffc5def3
commit 858c5059e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,10 +20,9 @@
from __future__ import annotations
import itertools
from typing import Tuple, Iterable, Union, List, Dict, Optional, Hashable, TypeAlias
from typing import Tuple, Iterable, Union, List, Dict, Optional, Hashable, NewType
from evdev import ecodes
from evdev._ecodes import EV_ABS, EV_KEY, EV_REL
from inputremapper.input_event import InputEvent
from pydantic import BaseModel, root_validator, validator
@ -44,7 +43,7 @@ DIFFICULT_COMBINATIONS = [
ecodes.KEY_RIGHTALT,
]
DeviceHash: TypeAlias = str
DeviceHash = NewType("DeviceHash", str)
EMPTY_TYPE = 99

Loading…
Cancel
Save