Skip to content

Conversation

myrkytyn
Copy link

@myrkytyn myrkytyn commented Jul 18, 2025

Replace MultiHostUrl.build() with PostgresDsn.build() to match the PostgresDsn return type annotation and resolve type checker error

Fix for the error:

Type "MultiHostUrl" is not assignable to return type "PostgresDsn"
"MultiHostUrl" is not assignable to "PostgresDsn"

myrkytyn added 2 commits July 18, 2025 22:33
Replace MultiHostUrl.build() with PostgresDsn.build() to match the PostgresDsn return type annotation and resolve type checker error
@YuriiMotov
Copy link
Member

YuriiMotov commented Aug 30, 2025

It was initially PostgresDsn, but changed to MultiHostUrl in this commit: 4369524
There is no explanation why..

As an alternative, we may want to change the return type to MultiHostUrl to make it more general.

BTW, I couldn't reproduce the type checker error. What type checker do you use?

@YuriiMotov YuriiMotov changed the title fix: correct return type for SQLALCHEMY_DATABASE_URI computed field 🚨 Fix correct return type for SQLALCHEMY_DATABASE_URI computed field Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants