Skip to content

Commit 6232b2f

Browse files
committed
Update core.py
1 parent 680ec59 commit 6232b2f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

binary/core.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,7 @@ def convert_units(
165165

166166
if to:
167167
try:
168-
if to == BYTE:
169-
return b // to, PREFIXES[to]
170-
else:
171-
return b / to, PREFIXES[to]
168+
return b // to if to == BYTE else b / to, PREFIXES[to]
172169
except KeyError:
173170
raise ValueError(f'{to} is not a valid unit.')
174171

0 commit comments

Comments
 (0)