From 832b6eeb4a14e669099c486862c9f568215d5afb Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 22 Sep 2023 09:04:21 +0200 Subject: [PATCH] remove unnecessary list comprehension to fix CI --- git/refs/symbolic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 4d087e7a7..549160444 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -200,7 +200,7 @@ def _check_ref_name_valid(ref_path: PathLike) -> None: raise ValueError(f"Invalid reference '{ref_path}': references cannot end with a forward slash (/)") elif previous == "@" and one_before_previous is None: raise ValueError(f"Invalid reference '{ref_path}': references cannot be '@'") - elif any([component.endswith(".lock") for component in str(ref_path).split("/")]): + elif any(component.endswith(".lock") for component in str(ref_path).split("/")): raise ValueError( f"Invalid reference '{ref_path}': references cannot have slash-separated components that end with" f" '.lock'"