Skip to content

Fix transaction typing#2232

Open
vlakius wants to merge 2 commits into
tortoise:developfrom
vlakius:fix-transaction-typing
Open

Fix transaction typing#2232
vlakius wants to merge 2 commits into
tortoise:developfrom
vlakius:fix-transaction-typing

Conversation

@vlakius

@vlakius vlakius commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Changed type annotation in order to have the correct type annotation in

from tortoise.transactions import in_transaction

async def main():
    async with in_transaction() as conn: # <--- here

Description

Changed return type from generic T_conn to TransactionalDBClient

Motivation and Context

#2174

How Has This Been Tested?

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codspeed-hq

codspeed-hq Bot commented Jun 29, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing vlakius:fix-transaction-typing (2485b7a) with develop (9f42589)

Open in CodSpeed

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