From 45103f148bc7dda9158a236073514a0b60ccf576 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 8 Nov 2024 18:58:40 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B9=20Feed=20the=20hobgoblins=20(delin?= =?UTF-8?q?t).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pytest_flake8.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pytest_flake8.py b/pytest_flake8.py index 78475bd..62b9dd2 100644 --- a/pytest_flake8.py +++ b/pytest_flake8.py @@ -136,11 +136,14 @@ def setup(self): pytest.skip("file(s) previously passed FLAKE8 checks") def runtest(self): - with BytesIO() as bo, TextIOWrapper( - bo, encoding='utf-8' - ) as to, BytesIO() as be, TextIOWrapper( - be, encoding='utf-8' - ) as te, redirect_stdout(to), redirect_stderr(te): + with ( + BytesIO() as bo, + TextIOWrapper(bo, encoding='utf-8') as to, + BytesIO() as be, + TextIOWrapper(be, encoding='utf-8') as te, + redirect_stdout(to), + redirect_stderr(te), + ): found_errors = check_file( self.fspath, self.flake8ignore,