#278 Fix compatability with python 3.8 (#280)

pull/285/head
jonasBoss 3 years ago committed by GitHub
parent b3e1e4ca19
commit 3732d9e1e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,7 +27,7 @@ from typing import Tuple
from inputremapper.exceptions import InputEventCreationError
@dataclass(frozen=True, slots=True)
@dataclass(frozen=True) # Todo: add slots=True as soon as python 3.10 is in common distros
class InputEvent:
"""
the evnet used by inputremapper

@ -91,10 +91,10 @@ class TestInputEvent(unittest.TestCase):
)
self.assertEqual(e1.type_and_code, (evdev.ecodes.EV_KEY, evdev.ecodes.BTN_LEFT))
with self.assertRaises(TypeError):
with self.assertRaises(FrozenInstanceError): # would be TypeError on a slotted class
e1.event_tuple = (1, 2, 3)
with self.assertRaises(TypeError):
with self.assertRaises(FrozenInstanceError): # would be TypeError on a slotted class
e1.type_and_code = (1, 2)
with self.assertRaises(FrozenInstanceError):

Loading…
Cancel
Save