From cb68516a09ffc902da3b5976d1d3673d1f645dc7 Mon Sep 17 00:00:00 2001 From: nada Date: Thu, 29 Aug 2024 10:37:30 +0100 Subject: [PATCH] fix lint findings --- odxtools/multiplexer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odxtools/multiplexer.py b/odxtools/multiplexer.py index 7e2adc86..a9c3a9ad 100644 --- a/odxtools/multiplexer.py +++ b/odxtools/multiplexer.py @@ -96,6 +96,7 @@ def encode_into_pdu(self, physical_value: ParameterValue, encode_state: EncodeSt f"(case_name, content_value) tuple instead of as '{physical_value!r}'") mux_case: Union[MultiplexerCase, MultiplexerDefaultCase] + applicable_cases: List[Union[MultiplexerCase, MultiplexerDefaultCase]] if isinstance(case_spec, str): applicable_cases = [x for x in self.cases if x.short_name == case_spec] @@ -107,7 +108,7 @@ def encode_into_pdu(self, physical_value: ParameterValue, encode_state: EncodeSt odxassert(len(applicable_cases) == 1) mux_case = applicable_cases[0] - if mux_case == self.default_case: + if self.default_case and mux_case == self.default_case: key_value = 0 else: key_value, _ = self._get_case_limits(mux_case)