1313class TestGenerateConfigCommand :
1414 """Test the generate-config command."""
1515
16- def test_non_interactive_generates_default_config (self ):
16+ def test_non_interactive_generates_default_config (self ) -> None :
1717 """Test that non-interactive mode generates a valid default config."""
1818 runner = CliRunner ()
1919 with tempfile .TemporaryDirectory () as tmpdir :
@@ -33,7 +33,7 @@ def test_non_interactive_generates_default_config(self):
3333 assert len (config .languages ) == 1
3434 assert config .languages [0 ].name == "python"
3535
36- def test_non_interactive_overwrites_existing_file (self ):
36+ def test_non_interactive_overwrites_existing_file (self ) -> None :
3737 """Test that non-interactive mode overwrites existing files without prompting."""
3838 runner = CliRunner ()
3939 with tempfile .TemporaryDirectory () as tmpdir :
@@ -50,7 +50,7 @@ def test_non_interactive_overwrites_existing_file(self):
5050 assert "existing content" not in content
5151 assert "# antipasta configuration file" in content
5252
53- def test_interactive_mode_with_defaults (self ):
53+ def test_interactive_mode_with_defaults (self ) -> None :
5454 """Test interactive mode accepting all defaults."""
5555 runner = CliRunner ()
5656 with tempfile .TemporaryDirectory () as tmpdir :
@@ -81,7 +81,7 @@ def test_interactive_mode_with_defaults(self):
8181 assert config .defaults .max_cyclomatic_complexity == 10
8282 assert config .defaults .max_cognitive_complexity == 15
8383
84- def test_interactive_mode_with_custom_values (self ):
84+ def test_interactive_mode_with_custom_values (self ) -> None :
8585 """Test interactive mode with custom threshold values."""
8686 runner = CliRunner ()
8787 with tempfile .TemporaryDirectory () as tmpdir :
@@ -124,7 +124,7 @@ def test_interactive_mode_with_custom_values(self):
124124 assert "*.pyc" in config .ignore_patterns
125125 assert "__pycache__" in config .ignore_patterns
126126
127- def test_interactive_mode_file_exists_abort (self ):
127+ def test_interactive_mode_file_exists_abort (self ) -> None :
128128 """Test that interactive mode aborts when user declines to overwrite."""
129129 runner = CliRunner ()
130130 with tempfile .TemporaryDirectory () as tmpdir :
@@ -156,7 +156,7 @@ def test_interactive_mode_file_exists_abort(self):
156156 content = output_file .read_text ()
157157 assert content == "existing content\n "
158158
159- def test_interactive_mode_file_exists_overwrite (self ):
159+ def test_interactive_mode_file_exists_overwrite (self ) -> None :
160160 """Test that interactive mode overwrites when user confirms."""
161161 runner = CliRunner ()
162162 with tempfile .TemporaryDirectory () as tmpdir :
@@ -188,7 +188,7 @@ def test_interactive_mode_file_exists_overwrite(self):
188188 assert "old content" not in content
189189 assert "# antipasta configuration file" in content
190190
191- def test_default_output_path (self ):
191+ def test_default_output_path (self ) -> None :
192192 """Test that default output path is .antipasta.yaml."""
193193 runner = CliRunner ()
194194 with runner .isolated_filesystem ():
@@ -198,7 +198,7 @@ def test_default_output_path(self):
198198 assert Path (".antipasta.yaml" ).exists ()
199199 assert "✅ Configuration saved to .antipasta.yaml" in result .output
200200
201- def test_generated_config_has_helpful_comments (self ):
201+ def test_generated_config_has_helpful_comments (self ) -> None :
202202 """Test that generated config includes helpful comments."""
203203 runner = CliRunner ()
204204 with tempfile .TemporaryDirectory () as tmpdir :
@@ -217,7 +217,7 @@ def test_generated_config_has_helpful_comments(self):
217217 assert "# Files and patterns to ignore during analysis" in content
218218 assert "# Whether to use .gitignore file for excluding files" in content
219219
220- def test_javascript_coming_soon_message (self ):
220+ def test_javascript_coming_soon_message (self ) -> None :
221221 """Test that JavaScript/TypeScript shows 'coming soon' message."""
222222 runner = CliRunner ()
223223 with tempfile .TemporaryDirectory () as tmpdir :
@@ -248,7 +248,7 @@ def test_javascript_coming_soon_message(self):
248248 assert len (config .languages ) == 1
249249 assert config .languages [0 ].name == "python"
250250
251- def test_permission_error_handling (self ):
251+ def test_permission_error_handling (self ) -> None :
252252 """Test that permission errors are handled gracefully."""
253253 runner = CliRunner ()
254254 with patch ("builtins.open" , side_effect = PermissionError ("Permission denied" )):
@@ -259,7 +259,7 @@ def test_permission_error_handling(self):
259259 assert result .exit_code == 1
260260 assert "❌ Error saving configuration: Permission denied" in result .output
261261
262- def test_interactive_mode_invalid_values_reprompt (self ):
262+ def test_interactive_mode_invalid_values_reprompt (self ) -> None :
263263 """Test that invalid values trigger re-prompt."""
264264 runner = CliRunner ()
265265 with tempfile .TemporaryDirectory () as tmpdir :
@@ -289,7 +289,7 @@ def test_interactive_mode_invalid_values_reprompt(self):
289289 assert result .exit_code == 0
290290 assert output_file .exists ()
291291
292- def test_shows_metric_ranges_in_prompts (self ):
292+ def test_shows_metric_ranges_in_prompts (self ) -> None :
293293 """Test that metric prompts show valid ranges."""
294294 runner = CliRunner ()
295295 with tempfile .TemporaryDirectory () as tmpdir :
@@ -317,7 +317,7 @@ def test_shows_metric_ranges_in_prompts(self):
317317 assert "Range: 1-100" in result .output # Cognitive
318318 assert "Range: 0-100" in result .output # Maintainability
319319
320- def test_advanced_metrics_validation (self ):
320+ def test_advanced_metrics_validation (self ) -> None :
321321 """Test validation of advanced Halstead metrics."""
322322 runner = CliRunner ()
323323 with tempfile .TemporaryDirectory () as tmpdir :
0 commit comments