Skip to content

Commit

Permalink
Replace if statement with if expression
Browse files Browse the repository at this point in the history
  • Loading branch information
bpepple committed Oct 9, 2021
1 parent 9e8feae commit 57c5161
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions darkseid/issuestring.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ def as_string(self, pad: int = 0) -> str:
num_f: float = abs(self.num)

num_int = int(num_f)
num_s = str(num_int)
if float(num_int) != num_f:
num_s = str(num_f)

num_s = str(num_f) if float(num_int) != num_f else str(num_int)
num_s += self.suffix

# create padding
Expand Down

0 comments on commit 57c5161

Please sign in to comment.