Skip to content

Commit 333f306

Browse files
committed
tests/cmd(style[GitStash]): use ternary for apply/pop
why: Fix ruff SIM108 lint error what: - Convert if/else to ternary operator for stash apply/pop
1 parent 97f4d1e commit 333f306

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

tests/cmd/test_git.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -981,10 +981,7 @@ def test_stash_apply_pop(
981981
assert stash is not None
982982

983983
# Apply or pop
984-
if method == "apply":
985-
result = stash.apply()
986-
else:
987-
result = stash.pop()
984+
result = stash.apply() if method == "apply" else stash.pop()
988985

989986
# Should succeed
990987
assert "error" not in result.lower() or "conflict" in result.lower()

0 commit comments

Comments
 (0)