Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Some ruff fixes
  • Loading branch information
ianthomas23 committed Mar 16, 2026
commit 27714c268842ee36a6887d679ff4cd01375294b8
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
GIT2CPP_TEST_WASM = os.getenv("GIT2CPP_TEST_WASM") == "1"

if GIT2CPP_TEST_WASM:
from .conftest_wasm import *
from .conftest_wasm import * # noqa: F403


# Fixture to run test in current tmp_path
Expand Down
2 changes: 1 addition & 1 deletion test/conftest_wasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def pytest_ignore_collect(collection_path: pathlib.Path) -> bool:
return collection_path.name not in [
"test_add.py",
"test_branch.py",
"test_checkout.py"
"test_checkout.py",
"test_clone.py",
"test_commit.py",
"test_config.py",
Expand Down
12 changes: 6 additions & 6 deletions test/test_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ def test_diff_inter_hunk_context(
# Count hunks in small context output
hunk_count_small = len(
[
l
for l in p_small.stdout.split("\n")
if l.startswith("@@") and l.endswith("@@")
line
for line in p_small.stdout.split("\n")
if line.startswith("@@") and line.endswith("@@")
]
)

Expand All @@ -421,9 +421,9 @@ def test_diff_inter_hunk_context(
# Count hunks in large context output
hunk_count_large = len(
[
l
for l in p_large.stdout.split("\n")
if l.startswith("@@") and l.endswith("@@")
line
for line in p_large.stdout.split("\n")
if line.startswith("@@") and line.endswith("@@")
]
)

Expand Down
4 changes: 2 additions & 2 deletions test/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ def test_log_commit_without_references(commit_env_config, git2cpp_path, tmp_path

# First commit line should have references
lines = p_log.stdout.split("\n")
first_commit_line = [l for l in lines if l.startswith("commit")][0]
first_commit_line = [line for line in lines if line.startswith("commit")][0]
assert "(" in first_commit_line # Has references

# Second commit (older one) should not have empty parentheses
second_commit_line = [l for l in lines if l.startswith("commit")][1]
second_commit_line = [line for line in lines if line.startswith("commit")][1]
# Should either have no parentheses or have actual references
if "(" in second_commit_line:
# If it has parentheses, they shouldn't be empty
Expand Down
2 changes: 1 addition & 1 deletion test/test_revlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_revlist(repo_init_with_commit, commit_env_config, git2cpp_path, tmp_pat
p = subprocess.run(cmd, capture_output=True, cwd=tmp_path, text=True)
assert p.returncode == 0

lines = [l for l in p.stdout.splitlines() if l.strip()]
lines = [line for line in p.stdout.splitlines() if line.strip()]
assert len(lines) == 2
assert all(len(oid) == 40 for oid in lines)
assert lines[0] != lines[1]
Loading