Skip to content

Commit

Permalink
compare tool: string handling fixes
Browse files Browse the repository at this point in the history
we now use f-strings instead of manual string concatination where
possible and we specify all string literals using double quotes.

Signed-off-by: Andreas Lauser <[email protected]>
Signed-off-by: Katja Köhler <[email protected]>
  • Loading branch information
andlaus committed Jan 26, 2024
1 parent ae0ffba commit 0158b81
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 135 deletions.
2 changes: 1 addition & 1 deletion odxtools/cli/_print_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def extract_service_tabulation_data(services: List[DiagService]) -> Dict[str, An
if service.request:
prefix = service.request.coded_const_prefix()
request.append(f"0x{str(prefix.hex().upper())[:32]}...") if len(
prefix) > 32 else request.append(f"0x{str(prefix.upper())}")
prefix) > 32 else request.append(f"0x{str(prefix.hex().upper())}")
else:
request.append(None)

Expand Down
Loading

0 comments on commit 0158b81

Please sign in to comment.