diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py index 22ad415d0af..861793bf7cc 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -177,11 +177,11 @@ def make_numbered_dir(root: Path, prefix: str) -> Path: else: _force_symlink(root, prefix + "current", new_path) return new_path - else: - raise OSError( - "could not create numbered dir with prefix " - "{prefix} in {root} after 10 tries".format(prefix=prefix, root=root) - ) + + raise OSError( + "could not create numbered dir with prefix " + "{prefix} in {root} after 10 tries".format(prefix=prefix, root=root) + ) def create_cleanup_lock(p: Path) -> Path: