Skip to content

Conversation

@AlexPetul
Copy link
Contributor

@AlexPetul AlexPetul commented Nov 29, 2025

Description

Add scoped_session and async_scoped_session to type annotations for __session__ and __async_session__ correspondingly.

I dont think adding tests here is reasonable, since scoped sessions are callable and it works fine with existing _get_sync_persistence and _get_async_persistence methods.

Closes #730

@AlexPetul AlexPetul changed the title Add scoped_session and async_scoped_session to type annotations fix: add scoped_session and async_scoped_session to type annotations Nov 29, 2025
@AlexPetul AlexPetul marked this pull request as ready for review November 29, 2025 11:25
@AlexPetul AlexPetul requested a review from adhtruong as a code owner November 29, 2025 11:25
@github-actions
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/800

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.

Bug: Type error: scoped_session[Session] incompatible with SQLAlchemyFactory.__session__

1 participant