diff options
Diffstat (limited to 'Lib/asyncio/base_futures.py')
-rw-r--r-- | Lib/asyncio/base_futures.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/asyncio/base_futures.py b/Lib/asyncio/base_futures.py index 01259a0..2ee82c3 100644 --- a/Lib/asyncio/base_futures.py +++ b/Lib/asyncio/base_futures.py @@ -1,4 +1,4 @@ -__all__ = [] +__all__ = () import concurrent.futures._base import reprlib @@ -48,7 +48,7 @@ def _format_callbacks(cb): cb = '{}, <{} more>, {}'.format(format_cb(cb[0]), size - 2, format_cb(cb[-1])) - return 'cb=[%s]' % cb + return f'cb=[{cb}]' def _future_repr_info(future): @@ -57,15 +57,15 @@ def _future_repr_info(future): info = [future._state.lower()] if future._state == _FINISHED: if future._exception is not None: - info.append('exception={!r}'.format(future._exception)) + info.append(f'exception={future._exception!r}') else: # use reprlib to limit the length of the output, especially # for very long strings result = reprlib.repr(future._result) - info.append('result={}'.format(result)) + info.append(f'result={result}') if future._callbacks: info.append(_format_callbacks(future._callbacks)) if future._source_traceback: frame = future._source_traceback[-1] - info.append('created at %s:%s' % (frame[0], frame[1])) + info.append(f'created at {frame[0]}:{frame[1]}') return info |