@@ -67,7 +67,7 @@ def test_returns_head_when_repository_has_commits(self) -> None:
6767
6868 def test_returns_empty_tree_hash_when_repository_has_no_commits (self ) -> None :
6969 """Test that an empty tree hash is returned when the repository has no commits."""
70- with temporary_git_repository () as (temp_dir , repo ):
70+ with temporary_git_repository () as (_temp_dir , repo ):
7171 result = get_safe_head_reference_for_diff (repo )
7272 expected_empty_tree_hash = consts .GIT_EMPTY_TREE_OBJECT
7373 assert result == expected_empty_tree_hash
@@ -343,7 +343,7 @@ def test_diff_with_bare_repository(self) -> None:
343343
344344 def test_diff_with_no_paths (self ) -> None :
345345 """Test behavior when the diff has neither a_path nor b_path."""
346- with temporary_git_repository () as (temp_dir , repo ):
346+ with temporary_git_repository () as (_temp_dir , repo ):
347347
348348 class MockDiff :
349349 def __init__ (self ) -> None :
@@ -409,7 +409,7 @@ class TestGetDefaultBranchesForMergeBase:
409409 def test_environment_variable_override (self ) -> None :
410410 """Test that the environment variable takes precedence."""
411411 with (
412- temporary_git_repository () as (temp_dir , repo ),
412+ temporary_git_repository () as (_temp_dir , repo ),
413413 patch .dict (os .environ , {consts .CYCODE_DEFAULT_BRANCH_ENV_VAR_NAME : 'custom-main' }),
414414 ):
415415 branches = _get_default_branches_for_merge_base (repo )
@@ -418,7 +418,7 @@ def test_environment_variable_override(self) -> None:
418418
419419 def test_git_symbolic_ref_success (self ) -> None :
420420 """Test getting default branch via git symbolic-ref."""
421- with temporary_git_repository () as (temp_dir , repo ):
421+ with temporary_git_repository () as (_temp_dir , _repo ):
422422 # Create a mock repo with a git interface that returns origin/main
423423 mock_repo = Mock ()
424424 mock_repo .git .symbolic_ref .return_value = 'refs/remotes/origin/main'
@@ -429,7 +429,7 @@ def test_git_symbolic_ref_success(self) -> None:
429429
430430 def test_git_symbolic_ref_with_master (self ) -> None :
431431 """Test getting default branch via git symbolic-ref when it's master."""
432- with temporary_git_repository () as (temp_dir , repo ):
432+ with temporary_git_repository () as (_temp_dir , _repo ):
433433 # Create a mock repo with a git interface that returns origin/master
434434 mock_repo = Mock ()
435435 mock_repo .git .symbolic_ref .return_value = 'refs/remotes/origin/master'
@@ -440,7 +440,7 @@ def test_git_symbolic_ref_with_master(self) -> None:
440440
441441 def test_git_remote_show_fallback (self ) -> None :
442442 """Test fallback to git remote show when symbolic-ref fails."""
443- with temporary_git_repository () as (temp_dir , repo ):
443+ with temporary_git_repository () as (_temp_dir , _repo ):
444444 # Create a mock repo where symbolic-ref fails but the remote show succeeds
445445 mock_repo = Mock ()
446446 mock_repo .git .symbolic_ref .side_effect = Exception ('symbolic-ref failed' )
@@ -459,7 +459,7 @@ def test_git_remote_show_fallback(self) -> None:
459459
460460 def test_both_git_methods_fail_fallback_to_hardcoded (self ) -> None :
461461 """Test fallback to hardcoded branches when both Git methods fail."""
462- with temporary_git_repository () as (temp_dir , repo ):
462+ with temporary_git_repository () as (_temp_dir , _repo ):
463463 # Create a mock repo where both Git methods fail
464464 mock_repo = Mock ()
465465 mock_repo .git .symbolic_ref .side_effect = Exception ('symbolic-ref failed' )
@@ -474,7 +474,7 @@ def test_both_git_methods_fail_fallback_to_hardcoded(self) -> None:
474474
475475 def test_no_duplicates_in_branch_list (self ) -> None :
476476 """Test that duplicate branches are not added to the list."""
477- with temporary_git_repository () as (temp_dir , repo ):
477+ with temporary_git_repository () as (_temp_dir , _repo ):
478478 # Create a mock repo that returns main (which is also in fallback list)
479479 mock_repo = Mock ()
480480 mock_repo .git .symbolic_ref .return_value = 'refs/remotes/origin/main'
@@ -486,7 +486,7 @@ def test_no_duplicates_in_branch_list(self) -> None:
486486
487487 def test_env_var_plus_git_detection (self ) -> None :
488488 """Test combination of environment variable and git detection."""
489- with temporary_git_repository () as (temp_dir , repo ):
489+ with temporary_git_repository () as (_temp_dir , _repo ):
490490 mock_repo = Mock ()
491491 mock_repo .git .symbolic_ref .return_value = 'refs/remotes/origin/develop'
492492
@@ -500,7 +500,7 @@ def test_env_var_plus_git_detection(self) -> None:
500500
501501 def test_malformed_symbolic_ref_response (self ) -> None :
502502 """Test handling of malformed symbolic-ref response."""
503- with temporary_git_repository () as (temp_dir , repo ):
503+ with temporary_git_repository () as (_temp_dir , _repo ):
504504 # Create a mock repo that returns a malformed response
505505 mock_repo = Mock ()
506506 mock_repo .git .symbolic_ref .return_value = 'malformed-response'
@@ -845,39 +845,39 @@ def _make_linear_history(self, repo: Repo, base_dir: str) -> tuple[str, str, str
845845 def test_two_dot_linear_history (self ) -> None :
846846 """For 'A..C', expect (A,C) in linear history."""
847847 with temporary_git_repository () as (temp_dir , repo ):
848- a , b , c = self ._make_linear_history (repo , temp_dir )
848+ a , _b , c = self ._make_linear_history (repo , temp_dir )
849849
850850 parsed_from , parsed_to , separator = parse_commit_range (f'{ a } ..{ c } ' , temp_dir )
851851 assert (parsed_from , parsed_to , separator ) == (a , c , '..' )
852852
853853 def test_three_dot_linear_history (self ) -> None :
854854 """For 'A...C' in linear history, expect (A,C)."""
855855 with temporary_git_repository () as (temp_dir , repo ):
856- a , b , c = self ._make_linear_history (repo , temp_dir )
856+ a , _b , c = self ._make_linear_history (repo , temp_dir )
857857
858858 parsed_from , parsed_to , separator = parse_commit_range (f'{ a } ...{ c } ' , temp_dir )
859859 assert (parsed_from , parsed_to , separator ) == (a , c , '...' )
860860
861861 def test_open_right_linear_history (self ) -> None :
862862 """For 'A..', expect (A,HEAD=C)."""
863863 with temporary_git_repository () as (temp_dir , repo ):
864- a , b , c = self ._make_linear_history (repo , temp_dir )
864+ a , _b , c = self ._make_linear_history (repo , temp_dir )
865865
866866 parsed_from , parsed_to , separator = parse_commit_range (f'{ a } ..' , temp_dir )
867867 assert (parsed_from , parsed_to , separator ) == (a , c , '..' )
868868
869869 def test_open_left_linear_history (self ) -> None :
870870 """For '..C' where HEAD==C, expect (HEAD=C,C)."""
871871 with temporary_git_repository () as (temp_dir , repo ):
872- a , b , c = self ._make_linear_history (repo , temp_dir )
872+ _a , _b , c = self ._make_linear_history (repo , temp_dir )
873873
874874 parsed_from , parsed_to , separator = parse_commit_range (f'..{ c } ' , temp_dir )
875875 assert (parsed_from , parsed_to , separator ) == (c , c , '..' )
876876
877877 def test_single_commit_spec (self ) -> None :
878878 """For 'A', expect (A,HEAD=C)."""
879879 with temporary_git_repository () as (temp_dir , repo ):
880- a , b , c = self ._make_linear_history (repo , temp_dir )
880+ a , _b , c = self ._make_linear_history (repo , temp_dir )
881881
882882 parsed_from , parsed_to , separator = parse_commit_range (a , temp_dir )
883883 assert (parsed_from , parsed_to , separator ) == (a , c , '..' )
@@ -935,7 +935,7 @@ def test_parse_all_for_empty_remote_scenario_with_two_commits(self) -> None:
935935
936936 def test_parse_all_with_empty_repository_returns_none (self ) -> None :
937937 """Test that '--all' returns None when repository has no commits."""
938- with temporary_git_repository () as (temp_dir , repo ):
938+ with temporary_git_repository () as (temp_dir , _repo ):
939939 # Empty repository with no commits
940940 parsed_from , parsed_to , separator = parse_commit_range ('--all' , temp_dir )
941941 # Should return None, None, None when HEAD doesn't exist
0 commit comments