From 9d39b135f4f84239787b0901d06a4f370a82d4bb Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 4 Apr 2021 04:40:19 -0400 Subject: Modernize code to use f-strings This also removes the encoding on the top, since Python 3 does it by default. It also changes some methods to use `yield from`. --- discord/file.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'discord/file.py') diff --git a/discord/file.py b/discord/file.py index 442931c3..df83f32e 100644 --- a/discord/file.py +++ b/discord/file.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - """ The MIT License (MIT) @@ -65,7 +63,7 @@ class File: if isinstance(fp, io.IOBase): if not (fp.seekable() and fp.readable()): - raise ValueError('File buffer {!r} must be seekable and readable'.format(fp)) + raise ValueError(f'File buffer {fp!r} must be seekable and readable') self.fp = fp self._original_pos = fp.tell() self._owner = False -- cgit v1.2.3