From 182ab0ad609cc11f327dad2023c784183b1b8276 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_patterns.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/shellhist/tests/test_patterns.py b/shellhist/tests/test_patterns.py index 954e0ce..b9edc46 100644 --- a/shellhist/tests/test_patterns.py +++ b/shellhist/tests/test_patterns.py @@ -14,14 +14,14 @@ from shellhist.core.patterns import ( class TestNgramAnalysis: """Test n-gram analysis functionality.""" - def test_empty_store(self): + def test_empty_store(self) -> None: """Test with empty store.""" store = HistoryStore() results = ngram_analysis(store, n=2) assert len(results) == 0 - def test_simple_pairs(self): + def test_simple_pairs(self) -> None: """Test detecting command pairs.""" store = HistoryStore() @@ -41,7 +41,7 @@ class TestNgramAnalysis: pair = results[0] assert "git status -> git log" in " -> ".join(pair.commands) - def test_triplets(self): + def test_triplets(self) -> None: """Test detecting command triplets.""" store = HistoryStore() @@ -62,7 +62,7 @@ class TestNgramAnalysis: assert len(results) == 1 assert results[0].frequency == 2 - def test_min_frequency_filter(self): + def test_min_frequency_filter(self) -> None: """Test minimum frequency filtering.""" store = HistoryStore() @@ -83,7 +83,7 @@ class TestNgramAnalysis: class TestDetectRepetitiveCommands: """Test repetitive command detection.""" - def test_detect_repetitive(self): + def test_detect_repetitive(self) -> None: """Test detecting repetitive single commands.""" store = HistoryStore() @@ -99,7 +99,7 @@ class TestDetectRepetitiveCommands: assert results[0].commands == ("git status",) assert results[0].frequency == 5 - def test_no_repetitive_commands(self): + def test_no_repetitive_commands(self) -> None: """Test when no commands are repetitive.""" store = HistoryStore() @@ -114,7 +114,7 @@ class TestDetectRepetitiveCommands: class TestDetectCommandPairs: """Test command pair detection.""" - def test_detect_pairs(self): + def test_detect_pairs(self) -> None: """Test detecting command pairs.""" store = HistoryStore() @@ -136,7 +136,7 @@ class TestDetectCommandPairs: class TestDetectCommandTriplets: """Test command triplet detection.""" - def test_detect_triplets(self): + def test_detect_triplets(self) -> None: """Test detecting command triplets.""" store = HistoryStore() @@ -161,7 +161,7 @@ class TestDetectCommandTriplets: class TestDetectCommonSequences: """Test common sequence detection.""" - def test_detect_sequences_various_lengths(self): + def test_detect_sequences_various_lengths(self) -> None: """Test detecting sequences of various lengths.""" store = HistoryStore()