@@ -15,6 +15,7 @@ class TestMainModule:
1515 @pytest .fixture
1616 def runner (self ):
1717 from click .testing import CliRunner
18+
1819 return CliRunner ()
1920
2021 def test_main_module_runs_help (self , runner ):
@@ -30,6 +31,7 @@ class TestCliEdgeCases:
3031 @pytest .fixture
3132 def runner (self ):
3233 from click .testing import CliRunner
34+
3335 return CliRunner ()
3436
3537 def test_non_existent_project_exits_1 (self , runner ):
@@ -40,18 +42,26 @@ def test_non_existent_project_exits_1(self, runner):
4042 def test_fail_threshold_exits_high (self , runner , tmp_path ):
4143 """--fail=0 exits 1 when findings exist (covers fail threshold path)."""
4244 (tmp_path / "src" / "unused.ts" ).parent .mkdir (parents = True , exist_ok = True )
43- (tmp_path / "src" / "unused.ts" ).write_text ("export function unused() { return 1; }\n " )
45+ (tmp_path / "src" / "unused.ts" ).write_text (
46+ "export function unused() { return 1; }\n "
47+ )
4448 result = runner .invoke (cli , ["-p" , str (tmp_path ), "scan" , "--fail" , "0" ])
4549 assert result .exit_code == 1
4650 assert "FAIL" in result .output
4751
4852 def test_ignore_flag_before_subcommand (self , runner , tmp_path ):
4953 """--ignore group option rejects submodule patterns (covers _merge_config_ignore)."""
5054 (tmp_path / "src" / "used.ts" ).parent .mkdir (parents = True , exist_ok = True )
51- (tmp_path / "src" / "used.ts" ).write_text ("export function used() { return 1; }\n " )
55+ (tmp_path / "src" / "used.ts" ).write_text (
56+ "export function used() { return 1; }\n "
57+ )
5258 (tmp_path / "src" / "unused.ts" ).parent .mkdir (parents = True , exist_ok = True )
53- (tmp_path / "src" / "unused.ts" ).write_text ("export function unused() { return 2; }\n " )
54- result = runner .invoke (cli , ["-p" , str (tmp_path ), "--ignore" , "**/unused.ts" , "scan" ])
59+ (tmp_path / "src" / "unused.ts" ).write_text (
60+ "export function unused() { return 2; }\n "
61+ )
62+ result = runner .invoke (
63+ cli , ["-p" , str (tmp_path ), "--ignore" , "**/unused.ts" , "scan" ]
64+ )
5565 assert result .exit_code == 0
5666 assert "unused" not in result .output
5767
@@ -62,6 +72,7 @@ class TestCliFormatOutput:
6272 @pytest .fixture
6373 def runner (self ):
6474 from click .testing import CliRunner
75+
6576 return CliRunner ()
6677
6778 @pytest .fixture
@@ -70,8 +81,8 @@ def sample(self, tmp_path):
7081 mod = tmp_path / "src" / "mod.ts"
7182 mod .parent .mkdir (parents = True , exist_ok = True )
7283 mod .write_text (
73- ' export function usedHelper() { return 1; }\n '
74- ' export function unusedHelper() { return 2; }\n '
84+ " export function usedHelper() { return 1; }\n "
85+ " export function unusedHelper() { return 2; }\n "
7586 )
7687 return tmp_path
7788
@@ -113,6 +124,7 @@ class TestRemoveCommand:
113124 @pytest .fixture
114125 def runner (self ):
115126 from click .testing import CliRunner
127+
116128 return CliRunner ()
117129
118130 def test_remove_dry_run_nothing_removable (self , runner , tmp_path ):
@@ -130,6 +142,7 @@ class TestStatsCommand:
130142 @pytest .fixture
131143 def runner (self ):
132144 from click .testing import CliRunner
145+
133146 return CliRunner ()
134147
135148 def test_stats_basic (self , runner , tmp_path ):
0 commit comments