Skip to content

Commit

Permalink
πŸ”§ chore: reorganize imports and cleanup tests
Browse files Browse the repository at this point in the history
πŸ”§ chore: reorganize imports and cleanup tests

πŸ”„ Refactoring:
- Reorganized import statements in __main__.py
- Moved import of CommitLoom to a more appropriate location

βœ… Tests:
- Adjusted import order in test_commit_loom.py
- Ensured proper assertion in TestErrorHandling

πŸ“ Documentation:
- Added newline at the end of __init__.py for consistency

Refactored code structure and improved test organization
  • Loading branch information
Test User committed Dec 9, 2024
1 parent 45af9ed commit d173820
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion commitloom/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
env_path = os.path.join(os.path.dirname(__file__), "..", ".env")
load_dotenv(dotenv_path=env_path)

from .cli.cli_handler import CommitLoom
from .cli import console
from .cli.cli_handler import CommitLoom


def handle_error(error: Exception) -> None:
Expand Down
7 changes: 4 additions & 3 deletions tests/test_commit_loom.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"""Tests for CommitLoom functionality."""

import pytest
from unittest.mock import MagicMock

import pytest

from commitloom.cli.cli_handler import CommitLoom
from commitloom.core.analyzer import CommitAnalysis, Warning, WarningLevel
from commitloom.core.analyzer import CommitAnalysis
from commitloom.core.git import GitError, GitFile
from commitloom.services.ai_service import CommitSuggestion

Expand Down Expand Up @@ -116,4 +117,4 @@ def test_commit_error(self, mock_deps, mocker):
loom = CommitLoom()
loom.run()

mock_console.print_error.assert_called()
mock_console.print_error.assert_called()
2 changes: 1 addition & 1 deletion tests/test_git/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""Git test package."""
"""Git test package."""

0 comments on commit d173820

Please sign in to comment.