From 0d33cdf02a2b742a63be75cbb2309803ea51c525 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 27 May 2024 23:12:29 +0200 Subject: [PATCH] [pylint] Disable the only 'misplaced-bare-raise' --- pyproject.toml | 3 +-- src/_pytest/logging.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4594595e2..3e01d048e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -211,10 +211,9 @@ disable = [ "keyword-arg-before-vararg", "line-too-long", "method-hidden", - "misplaced-bare-raise", "missing-docstring", "missing-timeout", - "multiple-statements", + "multiple-statements", # multiple-statements-on-one-line-colon (E701) from ruff "no-else-break", "no-else-continue", "no-else-raise", diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py index af5e443ce..c9139d369 100644 --- a/src/_pytest/logging.py +++ b/src/_pytest/logging.py @@ -401,7 +401,7 @@ class LogCaptureHandler(logging_StreamHandler): # The default behavior of logging is to print "Logging error" # to stderr with the call stack and some extra details. # pytest wants to make such mistakes visible during testing. - raise + raise # pylint: disable=misplaced-bare-raise @final