Skip to content

Commit

Permalink
Make TypeError message idiomatic
Browse files Browse the repository at this point in the history
Co-authored-by: CAM Gerlach <[email protected]>
  • Loading branch information
finefoot and CAM-Gerlach authored May 15, 2022
1 parent 1d652a5 commit 5f39d2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Lib/reprlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ def _join(self, pieces, level):
sep = ',\n' + (self.maxlevel - level + 1) * indent
except TypeError as error:
raise TypeError(
'Repr.indent must be of type NoneType, str or int, '
f'not {type(indent)}'
f'Repr.indent must be a str, int or None, not {type(indent)}'
) from error
return sep.join(('', *pieces, ''))[1:-len(indent) or None]

Expand Down

0 comments on commit 5f39d2f

Please sign in to comment.