From d998d1ad494383173a04ae07dc9e85cf592b5506 Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Wed, 31 Jul 2024 22:52:03 +0300 Subject: [PATCH] Satisfy linters --- src/darker/__main__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/darker/__main__.py b/src/darker/__main__.py index c91b6d445..cf4b72cad 100644 --- a/src/darker/__main__.py +++ b/src/darker/__main__.py @@ -451,7 +451,8 @@ def _import_pygments(): # type: ignore return highlight, TerminalFormatter, PythonLexer -def main( # pylint: disable=too-many-locals,too-many-branches,too-many-statements +# pylint: disable=too-many-locals,too-many-branches,too-many-statements +def main( # noqa: C901,PLR0912,PLR0915 argv: List[str] = None, ) -> int: """Parse the command line and reformat and optionally lint each source file @@ -555,9 +556,8 @@ def main( # pylint: disable=too-many-locals,too-many-branches,too-many-statemen rev2_repr = ( "the working tree" if revrange.rev2 == WORKTREE else revrange.rev2 ) - raise FileNotFoundError( - f"Path(s) {missing_reprs} do not exist in {rev2_repr}" - ) + msg = f"Path(s) {missing_reprs} do not exist in {rev2_repr}" + raise FileNotFoundError(msg) # These paths are relative to `common_root`: files_to_process = filter_python_files(paths, common_root, {})