Skip to content

Commit

Permalink
Consolidate returns across group and non-group.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Apr 23, 2024
1 parent e47eded commit d65ba3d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions inflect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3912,10 +3912,12 @@ def _handle_chunk(chunk):


signout = f"{sign} " if sign else ""
if group:
return f"{signout}{', '.join(numchunks)}"

return signout + ''.join(self._render(numchunks, decimal, comma))
valout = (
', '.join(numchunks)
if group else
''.join(self._render(numchunks, decimal, comma))
)
return signout + valout

@staticmethod
def _render(chunks, decimal, comma):
Expand Down

0 comments on commit d65ba3d

Please sign in to comment.