Skip to content

Commit

Permalink
refactor ServerAdapter.__repr__()
Browse files Browse the repository at this point in the history
"%r" placeholder exists at least from 2008
https://www.python.org/dev/peps/pep-3140/
  • Loading branch information
SergBobrovsky authored and defnull committed Sep 7, 2024
1 parent f961ffb commit 1d5b441
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3467,8 +3467,7 @@ def _listen_url(self):
return "http://%s:%d/" % (self.host, self.port)

def __repr__(self):
args = ', '.join('%s=%s' % (k, repr(v))
for k, v in self.options.items())
args = ', '.join('%s=%r' % kv for kv in self.options.items())
return "%s(%s)" % (self.__class__.__name__, args)


Expand Down

0 comments on commit 1d5b441

Please sign in to comment.