Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Oct 30, 2025

Description

LCORE-740: Type hints in conversation cache unit tests

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Related Tickets & Documents

  • Related Issue #LCORE-740

Summary by CodeRabbit

  • Tests
    • Added pervasive type annotations across cache tests — fixtures, mocks, and test signatures updated for clearer contracts.
    • Standardized fixture parameters (including path types) and return annotations to improve static checking.
    • Expanded improper/invalid configuration scenarios and explicit error-message assertions.
    • Improved mock typing for database-backed caches to increase test clarity and reliability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Walkthrough

Added explicit type annotations and return types to cache-related unit tests and fixtures across multiple test modules; sqlite fixture now accepts a Path. Changes are typing/signature-only and include mock method annotations and minor fixture renames for pytest mapping.

Changes

Cohort / File(s) Summary
Cache factory tests
tests/unit/cache/test_cache_factory.py
Added Path import; fixtures now return ConversationCacheConfiguration with typed DB configs (SQLite/PostgreSQL/Memory); sqlite_cache_config accepts tmpdir: Path; tests updated with explicit parameter and -> None return annotations and mutate config fields to exercise validation and assert specific ValueError messages.
Noop cache tests (typing only)
tests/unit/cache/test_noop_cache.py
Annotated the cache fixture to return NoopCache; added parameter type hints and -> None return annotations to all tests; no behavioral changes.
SQL-backed cache tests & mocks
tests/unit/cache/test_postgres_cache.py, tests/unit/cache/test_sqlite_cache.py
Added typing.Any where needed; annotated mock classes/methods (CursorMock, ConnectionMock); postgres_cache_config() fixture returns PostgreSQLDatabaseConfiguration and is registered as postgres_cache_config_fixture; create_cache(path: Path) -> SQLiteCache in sqlite tests; test signatures updated with explicit parameter types and -> None return annotations.

Sequence Diagram(s)

(Skipped — changes are typing and signature-only; no control-flow modifications to visualize.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Repetitive, homogeneous type-annotation and signature edits across tests.
  • Review attention:
    • Ensure fixtures construct correct configuration objects and fields.
    • Verify pytest fixture name mapping for postgres_cache_config_fixture.
    • Confirm tests that mutate config fields still trigger intended validation and exact error messages.

Possibly related PRs

Poem

🐰 I hopped through tests with nimble paws,

I sprinkled types and fixed the laws.
Paths and configs neat and clear,
Small typed hops bring testing cheer.
A twitch, a nibble — all is well.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "LCORE-740: Type hints in conversation cache unit tests" directly and accurately describes the primary changes in the changeset. The modifications across all four test files (test_cache_factory.py, test_noop_cache.py, test_postgres_cache.py, and test_sqlite_cache.py) consistently add explicit type annotations to fixtures, test functions, parameters, return types, and mock classes. The title is concise, specific, and clearly communicates what is being changed without vague terms or unnecessary noise.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
tests/unit/cache/test_cache_factory.py (2)

54-60: Incorrect type annotation for tmpdir fixture.

The tmpdir fixture returns py.path.local, not pathlib.Path. This creates a type mismatch.

Apply this diff to use the correct pytest fixture that returns pathlib.Path:

-@pytest.fixture(name="sqlite_cache_config_fixture")
-def sqlite_cache_config(tmpdir: Path) -> ConversationCacheConfiguration:
+@pytest.fixture(name="sqlite_cache_config_fixture") 
+def sqlite_cache_config(tmp_path: Path) -> ConversationCacheConfiguration:
     """Fixture containing initialized instance of SQLite cache."""
-    db_path = str(tmpdir / "test.sqlite")
+    db_path = str(tmp_path / "test.sqlite")
     return ConversationCacheConfiguration(
         type=CACHE_TYPE_SQLITE, sqlite=SQLiteDatabaseConfiguration(db_path=db_path)
     )

112-121: Incorrect type annotation for tmpdir parameter.

Same issue as the fixture: tmpdir returns py.path.local, not pathlib.Path.

Apply this diff to use the correct pytest fixture:

-def test_conversation_cache_sqlite_improper_config(tmpdir: Path) -> None:
+def test_conversation_cache_sqlite_improper_config(tmp_path: Path) -> None:
     """Check if memory cache configuration is checked in cache factory."""
-    db_path = str(tmpdir / "test.sqlite")
+    db_path = str(tmp_path / "test.sqlite")
     cc = ConversationCacheConfiguration(
         type=CACHE_TYPE_SQLITE, sqlite=SQLiteDatabaseConfiguration(db_path=db_path)
     )
🧹 Nitpick comments (1)
tests/unit/cache/test_cache_factory.py (1)

71-73: Remove trailing comma after single parameter.

While not incorrect, the trailing comma after a single parameter is unconventional and inconsistent with Python style conventions.

 def test_conversation_cache_noop(
-    noop_cache_config_fixture: ConversationCacheConfiguration,
+    noop_cache_config_fixture: ConversationCacheConfiguration
 ) -> None:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dbb065c and 1d2f4d8.

📒 Files selected for processing (1)
  • tests/unit/cache/test_cache_factory.py (9 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All modules start with descriptive module-level docstrings explaining purpose
Use logger = logging.getLogger(name) for module logging after import logging
Define type aliases at module level for clarity
All functions require docstrings with brief descriptions
Provide complete type annotations for all function parameters and return types
Use typing_extensions.Self in model validators where appropriate
Use modern union syntax (str | int) and Optional[T] or T | None consistently
Function names use snake_case with descriptive, action-oriented prefixes (get_, validate_, check_)
Avoid in-place parameter modification; return new data structures instead of mutating arguments
Use appropriate logging levels: debug, info, warning, error with clear messages
All classes require descriptive docstrings explaining purpose
Class names use PascalCase with conventional suffixes (Configuration, Error/Exception, Resolver, Interface)
Abstract base classes should use abc.ABC and @AbstractMethod for interfaces
Provide complete type annotations for all class attributes
Follow Google Python docstring style for modules, classes, and functions, including Args, Returns, Raises, Attributes sections as needed

Files:

  • tests/unit/cache/test_cache_factory.py
tests/{unit,integration}/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/{unit,integration}/**/*.py: Use pytest for all unit and integration tests
Do not use unittest in tests; pytest is the standard

Files:

  • tests/unit/cache/test_cache_factory.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/**/*.py: Use pytest-mock to create AsyncMock objects for async interactions in tests
Use the shared auth mock constant: MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") in tests

Files:

  • tests/unit/cache/test_cache_factory.py
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to src/{models/**/*.py,configuration.py} : Use precise type hints in configuration (e.g., Optional[FilePath], PositiveInt, SecretStr)
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to **/*.py : Provide complete type annotations for all function parameters and return types
🧬 Code graph analysis (1)
tests/unit/cache/test_cache_factory.py (2)
src/models/config.py (2)
  • ConversationCacheConfiguration (514-552)
  • InMemoryCacheConfig (81-84)
src/cache/cache_factory.py (2)
  • CacheFactory (16-49)
  • conversation_cache (20-49)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-pr
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)
🔇 Additional comments (4)
tests/unit/cache/test_cache_factory.py (4)

3-3: Path import is unused after fixing tmpdir type annotation.

The Path import is added to support the type annotations on lines 55 and 112. However, the tmpdir fixture returns py.path.local, not pathlib.Path. Consider using pytest's tmp_path fixture instead, which returns pathlib.Path and would make this import necessary.


124-126: Type annotations look good.

The parameter and return type annotations are correctly applied. The MockerFixture type is properly used for the mocker parameter.


135-146: Return type annotation correctly applied.


149-155: Return type annotation correctly applied.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d2f4d8 and bf08d48.

📒 Files selected for processing (1)
  • tests/unit/cache/test_noop_cache.py (9 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All modules start with descriptive module-level docstrings explaining purpose
Use logger = logging.getLogger(name) for module logging after import logging
Define type aliases at module level for clarity
All functions require docstrings with brief descriptions
Provide complete type annotations for all function parameters and return types
Use typing_extensions.Self in model validators where appropriate
Use modern union syntax (str | int) and Optional[T] or T | None consistently
Function names use snake_case with descriptive, action-oriented prefixes (get_, validate_, check_)
Avoid in-place parameter modification; return new data structures instead of mutating arguments
Use appropriate logging levels: debug, info, warning, error with clear messages
All classes require descriptive docstrings explaining purpose
Class names use PascalCase with conventional suffixes (Configuration, Error/Exception, Resolver, Interface)
Abstract base classes should use abc.ABC and @AbstractMethod for interfaces
Provide complete type annotations for all class attributes
Follow Google Python docstring style for modules, classes, and functions, including Args, Returns, Raises, Attributes sections as needed

Files:

  • tests/unit/cache/test_noop_cache.py
tests/{unit,integration}/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/{unit,integration}/**/*.py: Use pytest for all unit and integration tests
Do not use unittest in tests; pytest is the standard

Files:

  • tests/unit/cache/test_noop_cache.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/**/*.py: Use pytest-mock to create AsyncMock objects for async interactions in tests
Use the shared auth mock constant: MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") in tests

Files:

  • tests/unit/cache/test_noop_cache.py
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to src/{models/**/*.py,configuration.py} : Use precise type hints in configuration (e.g., Optional[FilePath], PositiveInt, SecretStr)
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to **/*.py : Provide complete type annotations for all function parameters and return types
🧬 Code graph analysis (1)
tests/unit/cache/test_noop_cache.py (1)
src/cache/noop_cache.py (1)
  • NoopCache (12-128)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: e2e_tests (ci)
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: build-pr
🔇 Additional comments (2)
tests/unit/cache/test_noop_cache.py (2)

30-35: LGTM: Fixture type hint correctly added.

The return type annotation -> NoopCache accurately reflects the fixture's return value and aligns with the coding guidelines.


38-198: LGTM: Test function type hints correctly added.

All test functions now have proper type annotations for parameters and return types, following the coding guidelines. The type hints accurately reflect the function signatures.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/unit/cache/test_postgres_cache.py (1)

48-48: Type hints correctly added to mock classes.

The type annotations for both mock classes are appropriate. The -> None return types correctly indicate that these methods either don't return a value or raise exceptions.

For added precision, line 63's cursor() method could use -> NoReturn since it always raises an exception:

+from typing import Any, NoReturn
+
 class ConnectionMock:
     """Mock class for connection."""

     def __init__(self) -> None:
         """Construct the connection mock class."""

-    def cursor(self) -> None:
+    def cursor(self) -> NoReturn:
         """Getter for mock cursor."""
         raise psycopg2.OperationalError("can not SELECT")

However, -> None is an acceptable convention for exception-raising methods.

Also applies to: 51-51, 60-60, 63-63

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf08d48 and 10a48b2.

📒 Files selected for processing (2)
  • tests/unit/cache/test_noop_cache.py (9 hunks)
  • tests/unit/cache/test_postgres_cache.py (28 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/unit/cache/test_noop_cache.py
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All modules start with descriptive module-level docstrings explaining purpose
Use logger = logging.getLogger(name) for module logging after import logging
Define type aliases at module level for clarity
All functions require docstrings with brief descriptions
Provide complete type annotations for all function parameters and return types
Use typing_extensions.Self in model validators where appropriate
Use modern union syntax (str | int) and Optional[T] or T | None consistently
Function names use snake_case with descriptive, action-oriented prefixes (get_, validate_, check_)
Avoid in-place parameter modification; return new data structures instead of mutating arguments
Use appropriate logging levels: debug, info, warning, error with clear messages
All classes require descriptive docstrings explaining purpose
Class names use PascalCase with conventional suffixes (Configuration, Error/Exception, Resolver, Interface)
Abstract base classes should use abc.ABC and @AbstractMethod for interfaces
Provide complete type annotations for all class attributes
Follow Google Python docstring style for modules, classes, and functions, including Args, Returns, Raises, Attributes sections as needed

Files:

  • tests/unit/cache/test_postgres_cache.py
tests/{unit,integration}/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/{unit,integration}/**/*.py: Use pytest for all unit and integration tests
Do not use unittest in tests; pytest is the standard

Files:

  • tests/unit/cache/test_postgres_cache.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/**/*.py: Use pytest-mock to create AsyncMock objects for async interactions in tests
Use the shared auth mock constant: MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") in tests

Files:

  • tests/unit/cache/test_postgres_cache.py
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to src/{models/**/*.py,configuration.py} : Use precise type hints in configuration (e.g., Optional[FilePath], PositiveInt, SecretStr)
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to **/*.py : Provide complete type annotations for all function parameters and return types
📚 Learning: 2025-09-18T16:46:33.353Z
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to src/{models/**/*.py,configuration.py} : Use precise type hints in configuration (e.g., Optional[FilePath], PositiveInt, SecretStr)

Applied to files:

  • tests/unit/cache/test_postgres_cache.py
🧬 Code graph analysis (1)
tests/unit/cache/test_postgres_cache.py (5)
src/models/config.py (2)
  • config (140-146)
  • PostgreSQLDatabaseConfiguration (87-105)
src/models/cache_entry.py (1)
  • CacheEntry (7-24)
src/models/responses.py (2)
  • ConversationData (165-176)
  • ReferencedDocument (179-191)
src/cache/cache_error.py (1)
  • CacheError (4-5)
src/cache/postgres_cache.py (1)
  • PostgresCache (17-419)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)
  • GitHub Check: build-pr
🔇 Additional comments (4)
tests/unit/cache/test_postgres_cache.py (4)

5-5: LGTM! Imports correctly updated for type hints.

The addition of Any from typing is necessary for the type annotations added throughout the file, and the import reordering improves consistency.

Also applies to: 16-17


68-75: Fixture type annotation is correct.

The return type PostgreSQLDatabaseConfiguration accurately reflects what the fixture provides and follows the coding guidelines for complete type annotations. Based on learnings.


78-81: Excellent work adding comprehensive type annotations to all test functions.

All test functions now have complete type hints for parameters and return types, following the coding guidelines perfectly. The consistent use of MockerFixture and PostgreSQLDatabaseConfiguration types improves code clarity and maintainability. As per coding guidelines.

Also applies to: 92-95, 105-108, 124-127, 137-140, 152-155, 166-169, 178-181, 192-195, 206-209, 223-226, 245-248, 261-264, 274-277, 291-294, 308-311, 327-330, 344-347, 361-364, 376-379, 408-411, 432-435, 448-451


237-237: Type annotations complete for remaining test functions.

The type hints are correctly applied, including the parameter-less test function on line 237 which appropriately has only a return type annotation.

Also applies to: 510-513

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/unit/cache/test_sqlite_cache.py (1)

72-412: LGTM: Test functions properly annotated.

All test functions now have correct -> None return type annotations, aligning with the coding guidelines for complete type annotations.

Consider migrating from the deprecated tmpdir fixture to tmp_path for better type consistency, as tmp_path returns pathlib.Path directly. This would align the runtime fixture type with the declared Path annotation.

Example migration for one test:

-def test_cache_initialization(tmpdir: Path) -> None:
+def test_cache_initialization(tmp_path: Path) -> None:
     """Test the get operation when DB is not connected."""
-    cache = create_cache(tmpdir)
+    cache = create_cache(tmp_path)
     assert cache is not None
     assert cache.connection is not None
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10a48b2 and 3169582.

📒 Files selected for processing (1)
  • tests/unit/cache/test_sqlite_cache.py (21 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All modules start with descriptive module-level docstrings explaining purpose
Use logger = logging.getLogger(name) for module logging after import logging
Define type aliases at module level for clarity
All functions require docstrings with brief descriptions
Provide complete type annotations for all function parameters and return types
Use typing_extensions.Self in model validators where appropriate
Use modern union syntax (str | int) and Optional[T] or T | None consistently
Function names use snake_case with descriptive, action-oriented prefixes (get_, validate_, check_)
Avoid in-place parameter modification; return new data structures instead of mutating arguments
Use appropriate logging levels: debug, info, warning, error with clear messages
All classes require descriptive docstrings explaining purpose
Class names use PascalCase with conventional suffixes (Configuration, Error/Exception, Resolver, Interface)
Abstract base classes should use abc.ABC and @AbstractMethod for interfaces
Provide complete type annotations for all class attributes
Follow Google Python docstring style for modules, classes, and functions, including Args, Returns, Raises, Attributes sections as needed

Files:

  • tests/unit/cache/test_sqlite_cache.py
tests/{unit,integration}/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/{unit,integration}/**/*.py: Use pytest for all unit and integration tests
Do not use unittest in tests; pytest is the standard

Files:

  • tests/unit/cache/test_sqlite_cache.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/**/*.py: Use pytest-mock to create AsyncMock objects for async interactions in tests
Use the shared auth mock constant: MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") in tests

Files:

  • tests/unit/cache/test_sqlite_cache.py
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to **/*.py : Provide complete type annotations for all function parameters and return types
Learnt from: CR
PR: lightspeed-core/lightspeed-stack#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:46:33.353Z
Learning: Applies to src/{models/**/*.py,configuration.py} : Use precise type hints in configuration (e.g., Optional[FilePath], PositiveInt, SecretStr)
🧬 Code graph analysis (1)
tests/unit/cache/test_sqlite_cache.py (3)
src/cache/sqlite_cache.py (4)
  • SQLiteCache (19-414)
  • connected (148-167)
  • initialize_cache (169-187)
  • insert_or_append (245-307)
src/models/config.py (1)
  • SQLiteDatabaseConfiguration (75-78)
src/utils/connection_decorator.py (1)
  • connection (6-22)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)
  • GitHub Check: build-pr
🔇 Additional comments (3)
tests/unit/cache/test_sqlite_cache.py (3)

5-5: LGTM: Appropriate import for mock typing.

The Any import is correctly used for mock class methods where strict typing is unnecessary.


42-62: LGTM: Mock classes properly typed.

The type annotations for CursorMock and ConnectionMock are correct. Using Any for the command parameter and cursor return type is appropriate for test mocks.


65-69: LGTM: Helper function correctly typed.

The type annotations for create_cache are accurate, with Path parameter and SQLiteCache return type matching the implementation.

@tisnik tisnik merged commit 6361e59 into lightspeed-core:main Oct 30, 2025
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant