File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -161,22 +161,21 @@ def __init__(
161161 :raises TypeError: if the max is not an integer or inf
162162 """
163163 if min < 1 :
164- raise ValueError ('min={} must be > 0' . format ( min ) )
164+ raise ValueError (f 'min={ min !s } must be > 0' )
165165
166166 if max == float ('inf' ):
167167 pass
168168 elif not isinstance (max , int ) or max == 0 :
169169 raise TypeError (
170170 'Expected an integer or the infinity value for the `max` '
171- 'argument but got {!r}.' . format ( max ) ,
171+ f 'argument but got { max !r} .' ,
172172 )
173173 elif max < 0 :
174174 max = float ('inf' )
175175
176176 if max < min :
177177 raise ValueError (
178- 'max={} must be > min={} (or infinity for no max)'
179- '' .format (max , min ),
178+ f'max={ max !s} must be > min={ min !s} (or infinity for no max)' ,
180179 )
181180
182181 self .server = server
You can’t perform that action at this time.
0 commit comments