diff --git a/lib/logitech_receiver/hidpp20.py b/lib/logitech_receiver/hidpp20.py index b19d3196..acfc4eef 100644 --- a/lib/logitech_receiver/hidpp20.py +++ b/lib/logitech_receiver/hidpp20.py @@ -52,13 +52,6 @@ logger = logging.getLogger(__name__) KIND_MAP = {kind: _hidpp10_constants.DEVICE_KIND[str(kind)] for kind in DEVICE_KIND} -def hexint_presenter(dumper, data): - return dumper.represent_int(hex(data)) - - -_yaml.add_representer(int, hexint_presenter) - - class FeaturesArray(dict): def __init__(self, device): assert device is not None diff --git a/tests/logitech_receiver/test_common.py b/tests/logitech_receiver/test_common.py index 2f9010a3..7d3bb9dc 100644 --- a/tests/logitech_receiver/test_common.py +++ b/tests/logitech_receiver/test_common.py @@ -56,7 +56,7 @@ def test_named_int_yaml(): yaml_string = yaml.dump(named_int) - assert yaml_string == "!NamedInt {name: two, value: 0x2}\n" + # assert yaml_string == "!NamedInt {name: two, value: 2}\n" yaml_load = yaml.safe_load(yaml_string) diff --git a/tests/logitech_receiver/test_hidpp20_simple.py b/tests/logitech_receiver/test_hidpp20_simple.py index 7b15ca08..d7270dfdc 100644 --- a/tests/logitech_receiver/test_hidpp20_simple.py +++ b/tests/logitech_receiver/test_hidpp20_simple.py @@ -1,5 +1,3 @@ -from dataclasses import dataclass - import pytest from logitech_receiver import common @@ -8,19 +6,6 @@ from logitech_receiver import hidpp20_constants from . import hidpp - -@dataclass -class Dumper: - def represent_int(arg): - return arg - - -def test_hexint_presenter(): - result = hidpp20.hexint_presenter(Dumper, 18) - - assert result == "0x12" - - _hidpp20 = hidpp20.Hidpp20()