Skip to content

Commit

Permalink
fix lint findings
Browse files Browse the repository at this point in the history
  • Loading branch information
nada-ben-ali committed Aug 29, 2024
1 parent 484e121 commit cb68516
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion odxtools/multiplexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)
Expand Down

0 comments on commit cb68516

Please sign in to comment.