Skip to content

Async Types#364

Open
BrianLusina wants to merge 12 commits into
mainfrom
feat/async-types
Open

Async Types#364
BrianLusina wants to merge 12 commits into
mainfrom
feat/async-types

Conversation

@BrianLusina

@BrianLusina BrianLusina commented Jul 12, 2026

Copy link
Copy Markdown
Member

Description

Adds async types to session and repository implementations

How can we test this?

  1. Run make test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new errors

Summary by CodeRabbit

  • New Features

    • Added async transaction helpers and exported async session utilities.
    • Introduced async repository base classes with CRUD, pagination, and optional soft-deletion-aware querying.
    • Added support for async commit hooks.
    • Expanded public exports for session and repository APIs.
  • Improvements

    • Standardized shared typing across repository components.
    • Enhanced JSON handling by converting Decimal values to JSON-friendly numeric forms.
  • Tests

    • Updated SQL test setup to use a Pydantic/Decimal-aware JSON serializer.

@BrianLusina BrianLusina self-assigned this Jul 12, 2026
@BrianLusina BrianLusina added documentation Improvements or additions to documentation enhancement New feature or request SQL Repository Session labels Jul 12, 2026
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds asynchronous session transactions, repository CRUD and query operations, soft deletion, commit callbacks, shared typing definitions, JSON serialization normalization, package-level exports, and typing-tooling updates.

Changes

Async database support

Layer / File(s) Summary
Shared contracts and exports
sanctumlabs_dbkit/sql/repository/types.py, sanctumlabs_dbkit/sql/session/types.py, sanctumlabs_dbkit/sql/session/session.py, sanctumlabs_dbkit/sql/types.py, sanctumlabs_dbkit/sql/session/__init__.py, sanctumlabs_dbkit/sql/repository/__init__.py
Defines shared repository and callable typing, asynchronous callback types, and package-level session and repository exports.
Async session transactions
sanctumlabs_dbkit/sql/session/async_session.py
Adds nested transaction selection, transaction decorators, and AsyncSessionLocal.
Async repository operations
sanctumlabs_dbkit/sql/repository/async_repository.py, sanctumlabs_dbkit/sql/repository/repository.py
Adds asynchronous creation, querying, retrieval, pagination, soft deletion, and not-found handling while centralizing repository generic typing.
Async commit callbacks
sanctumlabs_dbkit/sql/callbacks.py
Registers asynchronous commit hooks on AsyncSession.info under the shared hook key.
JSON serialization normalization
sanctumlabs_dbkit/sql/types.py, tests/sql/conftest.py
Recursively normalizes Decimal values in model serialization and configures the SQL test engine with Pydantic-aware JSON serialization.
Typing and tooling alignment
sanctumlabs_dbkit/sql/mixins.py, pyproject.toml, Makefile
Adjusts the SQLAlchemy table-name declaration typing and adds the ty dependency with a dedicated lint target.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ServiceMethod
  participant async_transaction
  participant AsyncSession
  participant Database
  ServiceMethod->>async_transaction: invoke decorated method
  async_transaction->>AsyncSession: begin transaction
  AsyncSession->>Database: execute database work
  Database-->>AsyncSession: return result
  AsyncSession-->>ServiceMethod: complete transaction
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too vague to identify the main change; it only says async types without naming the affected session and repository APIs. Rename it to reflect the main update, such as adding async session and repository types.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/async-types

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (4)
sanctumlabs_dbkit/sql/repository/types.py (1)

1-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add a module docstring to satisfy pylint.

Pipeline reports C0114: missing-module-docstring for this new file.

📝 Suggested fix
+"""
+Shared type definitions for repository models.
+"""
+
 from typing import (
     TypeVar,
     Union,
 )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sanctumlabs_dbkit/sql/repository/types.py` around lines 1 - 10, Add a
descriptive module docstring at the beginning of types.py, before the imports,
documenting the purpose of RepositoryBaseModel and the T type variable while
leaving their existing definitions unchanged.

Source: Pipeline failures

sanctumlabs_dbkit/sql/repository/async_repository.py (2)

104-116: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

delete silently no-ops when entity is not found.

await self.find(pk) returns None for missing or already soft-deleted entities (since include_deleted defaults to False), and the method silently returns without raising. Consider using find_or_raise or at least documenting the idempotent behavior, as callers may expect an error for non-existent keys.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sanctumlabs_dbkit/sql/repository/async_repository.py` around lines 104 - 116,
Update AsyncRepository.delete to explicitly handle a missing entity returned by
find, using find_or_raise if deletion should reject non-existent or already
soft-deleted records; otherwise document the intentional idempotent no-op
behavior in the method contract. Preserve the existing soft-deletion validation
and deleted_at assignment.

25-130: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

AsyncRepository largely duplicates the sync Repository.

Pylint R0801 flags duplicate code across the sync and async repositories. Consider extracting shared query-building logic (e.g., query, _supports_soft_deletion, soft-delete filtering) into a shared base or mixin to prevent drift when one version is updated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sanctumlabs_dbkit/sql/repository/async_repository.py` around lines 25 - 130,
Extract the duplicated query-building and soft-deletion logic from
AsyncRepository, including _supports_soft_deletion and query, into a shared base
class or mixin used by both repository implementations. Update AsyncRepository
and the sync Repository to reuse these shared symbols while preserving their
existing async and sync database operations and filtering behavior.

Source: Pipeline failures

sanctumlabs_dbkit/sql/session/types.py (1)

1-3: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add a module docstring to satisfy pylint.

Pipeline reports C0114: missing-module-docstring for this new file.

📝 Suggested fix
+"""
+Shared callable typing definitions for session decorators.
+"""
+
 from typing import Any, Callable, TypeVar
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sanctumlabs_dbkit/sql/session/types.py` around lines 1 - 3, Add a concise
module-level docstring at the beginning of types.py before the typing imports,
describing the module’s type definitions or session-related typing helpers;
leave FuncT unchanged.

Source: Pipeline failures

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sanctumlabs_dbkit/sql/repository/__init__.py`:
- Around line 1-7: Add a concise module-level docstring at the beginning of the
repository package’s __init__ module, before the Repository and AsyncRepository
imports, to resolve pylint C0114 while preserving the existing exports.

In `@sanctumlabs_dbkit/sql/repository/async_repository.py`:
- Around line 48-64: Update the repository create method to be async and await
both AsyncSession operations in its refresh branch: change create to async def,
await self.session.flush(), and await self.session.refresh(model_instance),
while preserving model construction, session.add, return behavior, and the
refresh flag semantics.

In `@sanctumlabs_dbkit/sql/session/__init__.py`:
- Around line 1-15: Add a concise module-level docstring at the start of
sanctumlabs_dbkit.sql.session’s __init__.py, before the imports, to satisfy
pylint C0114 while preserving the existing exports and import structure.

In `@sanctumlabs_dbkit/sql/session/async_session.py`:
- Around line 22-26: Update AsyncSession.begin so it passes nested=True to the
superclass whenever nested is explicitly requested or self.in_transaction() is
already true, matching the synchronous Session.begin behavior and the
transaction decorator contract.
- Around line 59-100: Update async_transaction to be a regular def that returns
the async wrapper, so decorator application produces a callable. Inside wrapper,
await func(self, *args, **kwargs) within the session transaction context, and
return the wrapper cast to FuncT to satisfy typing.
- Around line 51-56: Update the async transaction decorator’s wrapper to await
the coroutine returned by func before returning its result, and return the
wrapper through the appropriate cast to FuncT, matching the sync
Session.transaction implementation and satisfying mypy.

---

Nitpick comments:
In `@sanctumlabs_dbkit/sql/repository/async_repository.py`:
- Around line 104-116: Update AsyncRepository.delete to explicitly handle a
missing entity returned by find, using find_or_raise if deletion should reject
non-existent or already soft-deleted records; otherwise document the intentional
idempotent no-op behavior in the method contract. Preserve the existing
soft-deletion validation and deleted_at assignment.
- Around line 25-130: Extract the duplicated query-building and soft-deletion
logic from AsyncRepository, including _supports_soft_deletion and query, into a
shared base class or mixin used by both repository implementations. Update
AsyncRepository and the sync Repository to reuse these shared symbols while
preserving their existing async and sync database operations and filtering
behavior.

In `@sanctumlabs_dbkit/sql/repository/types.py`:
- Around line 1-10: Add a descriptive module docstring at the beginning of
types.py, before the imports, documenting the purpose of RepositoryBaseModel and
the T type variable while leaving their existing definitions unchanged.

In `@sanctumlabs_dbkit/sql/session/types.py`:
- Around line 1-3: Add a concise module-level docstring at the beginning of
types.py before the typing imports, describing the module’s type definitions or
session-related typing helpers; leave FuncT unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2f9c3669-61aa-4734-9b02-e9b899f6403f

📥 Commits

Reviewing files that changed from the base of the PR and between da0def9 and 2d7e4fb.

📒 Files selected for processing (10)
  • sanctumlabs_dbkit/sql/callbacks.py
  • sanctumlabs_dbkit/sql/repository/__init__.py
  • sanctumlabs_dbkit/sql/repository/async_repository.py
  • sanctumlabs_dbkit/sql/repository/repository.py
  • sanctumlabs_dbkit/sql/repository/types.py
  • sanctumlabs_dbkit/sql/session/__init__.py
  • sanctumlabs_dbkit/sql/session/async_session.py
  • sanctumlabs_dbkit/sql/session/session.py
  • sanctumlabs_dbkit/sql/session/types.py
  • sanctumlabs_dbkit/sql/types.py

Comment thread sanctumlabs_dbkit/sql/repository/__init__.py Outdated
Comment thread sanctumlabs_dbkit/sql/repository/async_repository.py Outdated
Comment thread sanctumlabs_dbkit/sql/session/__init__.py
Comment thread sanctumlabs_dbkit/sql/session/async_session.py
Comment thread sanctumlabs_dbkit/sql/session/async_session.py Outdated
Comment thread sanctumlabs_dbkit/sql/session/async_session.py Outdated
BrianLusina and others added 8 commits July 12, 2026 19:42
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Lusina <12752833+BrianLusina@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Lusina <12752833+BrianLusina@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Lusina <12752833+BrianLusina@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Lusina <12752833+BrianLusina@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Lusina <12752833+BrianLusina@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Lusina <12752833+BrianLusina@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
sanctumlabs_dbkit/sql/types.py (1)

87-111: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Decimal normalization logic is correct and well-structured.

The to_integral_value() comparison correctly distinguishes integral from fractional Decimals, and the recursive traversal of dict/list/tuple containers is sound.

One minor observation: the function name _normalise_json_compatible_value implies broad JSON compatibility, but only Decimal is normalized. Other non-JSON-native types that model_dump(mode='python') can produce (e.g., datetime, UUID, bytes) pass through unchanged. This is not a regression from the prior code, but if such fields exist on models using ColumnUsesPydanticModelsMixin, they could still cause serialization issues downstream. Worth keeping in mind if the scope of normalization expands in the future.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sanctumlabs_dbkit/sql/types.py` around lines 87 - 111, The current Decimal
normalization and recursive traversal in _normalise_json_compatible_value are
correct; no code changes are required for this review comment. Keep the existing
scope unchanged and treat support for datetime, UUID, bytes, or other
non-JSON-native values as future work only if normalization requirements expand.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@sanctumlabs_dbkit/sql/types.py`:
- Around line 87-111: The current Decimal normalization and recursive traversal
in _normalise_json_compatible_value are correct; no code changes are required
for this review comment. Keep the existing scope unchanged and treat support for
datetime, UUID, bytes, or other non-JSON-native values as future work only if
normalization requirements expand.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 963cb392-8d1a-4e07-ab28-01371615939f

📥 Commits

Reviewing files that changed from the base of the PR and between 2d7e4fb and 9f1602c.

📒 Files selected for processing (6)
  • sanctumlabs_dbkit/sql/repository/__init__.py
  • sanctumlabs_dbkit/sql/repository/async_repository.py
  • sanctumlabs_dbkit/sql/session/__init__.py
  • sanctumlabs_dbkit/sql/session/async_session.py
  • sanctumlabs_dbkit/sql/types.py
  • tests/sql/conftest.py
🚧 Files skipped from review as they are similar to previous changes (4)
  • sanctumlabs_dbkit/sql/session/init.py
  • sanctumlabs_dbkit/sql/repository/init.py
  • sanctumlabs_dbkit/sql/session/async_session.py
  • sanctumlabs_dbkit/sql/repository/async_repository.py

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Warnings
⚠️ ❗ Big PR

: Pull Request size seems relatively large. If Pull Request contains multiple changes, split each into separate PR will helps faster, easier review.

Generated by 🚫 dangerJS against 6776b36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sanctumlabs_dbkit/sql/repository/async_repository.py`:
- Around line 168-215: Move the shared find and find_or_raise implementations
into AsyncBaseRepository so AsyncWriteRepository.delete can resolve
self.find(pk) when used standalone. Remove the duplicate methods from
AsyncReadRepository, preserve their existing behavior, and keep the
AsyncWriteRepository docstring’s find usage valid.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d21e3f4-b7d4-481b-ba06-c330855c1cf9

📥 Commits

Reviewing files that changed from the base of the PR and between 9f1602c and 3e94b3b.

📒 Files selected for processing (4)
  • sanctumlabs_dbkit/sql/repository/__init__.py
  • sanctumlabs_dbkit/sql/repository/async_repository.py
  • sanctumlabs_dbkit/sql/repository/repository.py
  • tests/sql/conftest.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/sql/conftest.py

Comment thread sanctumlabs_dbkit/sql/repository/async_repository.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
sanctumlabs_dbkit/sql/repository/async_repository.py (1)

187-191: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove redundant __init__ method.

The constructor redundantly sets self.model and self.session after calling super().__init__, which already performs these exact assignments. You can remove this method entirely to inherit the parent class's constructor.

♻️ Proposed fix
-    def __init__(self, model: Type[T], session: AsyncSession) -> None:
-        """Creates an instance of the Repository"""
-        super().__init__(model, session)
-        self.model = model
-        self.session = session
-
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sanctumlabs_dbkit/sql/repository/async_repository.py` around lines 187 - 191,
Remove the redundant __init__ method from the repository class so it inherits
the parent constructor. The parent initialization already assigns model and
session, so retain the class behavior without duplicating those assignments.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Makefile`:
- Around line 69-72: Update the aggregate lint target to depend on lint-ty, and
add the lint-ty invocation to the relevant jobs in .github/workflows/lint.yml
and .gitlab-ci.yml so type checking runs in both local and CI lint workflows.

In `@sanctumlabs_dbkit/sql/repository/async_repository.py`:
- Line 177: Update the AsyncWriteRepository declaration to inherit from
AsyncBaseRepository[T] instead of the unparameterized AsyncBaseRepository,
preserving the existing T generic context for inherited methods such as find.
Remove the redundant Generic[T] base if parameterizing AsyncBaseRepository[T]
makes it unnecessary.

---

Nitpick comments:
In `@sanctumlabs_dbkit/sql/repository/async_repository.py`:
- Around line 187-191: Remove the redundant __init__ method from the repository
class so it inherits the parent constructor. The parent initialization already
assigns model and session, so retain the class behavior without duplicating
those assignments.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f7468637-4563-492b-8db7-fed311ed7c1a

📥 Commits

Reviewing files that changed from the base of the PR and between 3e94b3b and 6776b36.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • Makefile
  • pyproject.toml
  • sanctumlabs_dbkit/sql/mixins.py
  • sanctumlabs_dbkit/sql/repository/async_repository.py
  • sanctumlabs_dbkit/sql/repository/repository.py
  • sanctumlabs_dbkit/sql/types.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • sanctumlabs_dbkit/sql/repository/repository.py
  • sanctumlabs_dbkit/sql/types.py

Comment thread Makefile
Comment on lines +69 to +72
.PHONY: lint-ty
lint-ty: ## Runs type checking with ty
poetry run ty check

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Wire lint-ty into the enforced lint workflow.

This target is currently opt-in: make lint omits it, and the supplied .github/workflows/lint.yml and .gitlab-ci.yml jobs do not invoke it. Add lint-ty to the aggregate target and add it to CI; otherwise the new type checker will not gate changes.

Proposed Makefile change
-lint: format-black lint-flake8 lint-mypy lint-pylint
+lint: format-black lint-flake8 lint-mypy lint-pylint lint-ty
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 69 - 72, Update the aggregate lint target to depend on
lint-ty, and add the lint-ty invocation to the relevant jobs in
.github/workflows/lint.yml and .gitlab-ci.yml so type checking runs in both
local and CI lint workflows.

return scalars.first()


class AsyncWriteRepository(AsyncBaseRepository, Generic[T]):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Parameterize the generic base class directly.

Inheriting from AsyncBaseRepository without specifying its type parameter makes it fall back to AsyncBaseRepository[Any], causing inherited methods like find to lose their type context (Optional[Any]). Inheriting from AsyncBaseRepository[T] explicitly propagates the type and implicitly applies Generic[T].

♻️ Proposed fix
-class AsyncWriteRepository(AsyncBaseRepository, Generic[T]):
+class AsyncWriteRepository(AsyncBaseRepository[T]):
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
class AsyncWriteRepository(AsyncBaseRepository, Generic[T]):
class AsyncWriteRepository(AsyncBaseRepository[T]):
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sanctumlabs_dbkit/sql/repository/async_repository.py` at line 177, Update the
AsyncWriteRepository declaration to inherit from AsyncBaseRepository[T] instead
of the unparameterized AsyncBaseRepository, preserving the existing T generic
context for inherited methods such as find. Remove the redundant Generic[T] base
if parameterizing AsyncBaseRepository[T] makes it unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request Repository Session SQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant