From 2a63c265d20368197e70232cdb1dbde5eda6b69c Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sat, 31 Jan 2026 14:21:28 +0000 Subject: [PATCH] test: add -> None return type annotations to all test methods --- shellhist/tests/test_export.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/shellhist/tests/test_export.py b/shellhist/tests/test_export.py index 98d34de..ebbe3b0 100644 --- a/shellhist/tests/test_export.py +++ b/shellhist/tests/test_export.py @@ -16,7 +16,7 @@ from shellhist.core.patterns import CommandPattern class TestGenerateAlias: """Test alias generation functionality.""" - def test_generate_alias_single_command(self): + def test_generate_alias_single_command(self) -> None: """Test generating alias for single command.""" pattern = CommandPattern( commands=("git status",), @@ -29,7 +29,7 @@ class TestGenerateAlias: assert alias.startswith("alias ") assert "git status" in alias - def test_generate_alias_multiple_commands(self): + def test_generate_alias_multiple_commands(self) -> None: """Test generating alias for multiple commands.""" pattern = CommandPattern( commands=("git add .", "git commit", "git push"), @@ -43,7 +43,7 @@ class TestGenerateAlias: assert "git commit" in alias assert "git push" in alias - def test_generate_alias_custom_name(self): + def test_generate_alias_custom_name(self) -> None: """Test generating alias with custom name.""" pattern = CommandPattern( commands=("echo test",), @@ -59,7 +59,7 @@ class TestGenerateAlias: class TestGenerateAliasName: """Test alias name generation.""" - def test_alias_name_from_command(self): + def test_alias_name_from_command(self) -> None: """Test generating alias name from command.""" pattern = CommandPattern( commands=("git status",), @@ -71,7 +71,7 @@ class TestGenerateAliasName: assert "git" in name.lower() or "status" in name.lower() - def test_alias_name_from_multiple_commands(self): + def test_alias_name_from_multiple_commands(self) -> None: """Test generating alias name from multiple commands.""" pattern = CommandPattern( commands=("git add .", "git commit", "git push"), @@ -87,7 +87,7 @@ class TestGenerateAliasName: class TestGenerateScript: """Test script generation functionality.""" - def test_generate_script_dry_run(self): + def test_generate_script_dry_run(self) -> None: """Test script generation in dry-run mode.""" pattern = CommandPattern( commands=("echo hello", "echo world"), @@ -101,7 +101,7 @@ class TestGenerateScript: assert "echo world" in content assert "shellhist_" in path - def test_generate_script_with_custom_name(self): + def test_generate_script_with_custom_name(self) -> None: """Test script generation with custom name.""" pattern = CommandPattern( commands=("ls -la",), @@ -117,7 +117,7 @@ class TestGenerateScript: assert "my_custom_script" in path - def test_generate_script_actual_write(self): + def test_generate_script_actual_write(self) -> None: """Test actual script file creation.""" pattern = CommandPattern( commands=("echo test",), @@ -139,7 +139,7 @@ class TestGenerateScript: assert "echo test" in saved_content - def test_script_permissions(self): + def test_script_permissions(self) -> None: """Test that generated scripts are executable.""" pattern = CommandPattern( commands=("echo test",), @@ -161,7 +161,7 @@ class TestGenerateScript: class TestGenerateScriptName: """Test script name generation.""" - def test_script_name_from_commands(self): + def test_script_name_from_commands(self) -> None: """Test generating script name from commands.""" pattern = CommandPattern( commands=("git status", "git log"), @@ -174,7 +174,7 @@ class TestGenerateScriptName: assert len(name) > 0 assert name.startswith("shellhist_") - def test_script_name_sanitization(self): + def test_script_name_sanitization(self) -> None: """Test that script names are sanitized.""" pattern = CommandPattern( commands=("ls -la /tmp",),