Skip to content

Commit 23f0986

Browse files
author
Test User
committed
🐛 fix: update test files for compatibility
🐛 fix: update test files for compatibility 🔄 Refactor: - Refactored _create_git_file function in conftest.py to support type hints for size and hash parameters 🚮 Cleanup: - Removed unused imports from test_analyzer.py and test_cli_handler.py Improved code quality and compatibility in test files
1 parent 297a30f commit 23f0986

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

tests/conftest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
def mock_git_file():
1212
"""Fixture for creating GitFile instances."""
1313

14-
def _create_git_file(path: str, status: str = "M", size: int = None, hash_: str = None):
14+
def _create_git_file(
15+
path: str,
16+
status: str = "M",
17+
size: int | None = None,
18+
hash_: str | None = None,
19+
):
1520
file = GitFile(path=path, status=status)
1621
if size is not None:
1722
file.size = size

tests/test_analyzer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Tests for commit analyzer module."""
22

3-
from dataclasses import replace
43

54
import pytest
65

tests/test_cli_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Tests for CLI handler module."""
22

3-
import logging
43
import subprocess
54
from unittest.mock import MagicMock, patch
65

0 commit comments

Comments
 (0)