tortoise / tortoise-orm

Familiar asyncio ORM for python, built with relations in mind
https://tortoise.github.io
Apache License 2.0
4.39k stars 359 forks source link

Add __all__ to __init__.py for type checkers #1493

Closed zmievsa closed 8 months ago

zmievsa commented 8 months ago

When you generate migrations using aerich, it imports BaseDBAsyncClient directly from tortoise but tortoise doesn't export it which is a problem for some type checkers such as pyright. This fix resolves this.

How Has This Been Tested?

No need for testing

Checklist:

zmievsa commented 8 months ago

@long2ice A gentle ping to take a look. Note that this can break some integrations which imported "*" from tortoise and used some of the internal stuff defined/imported in the __init__.py but it is extremely unlikely.

long2ice commented 8 months ago

Thanks! Just need resolve conflicts.

zmievsa commented 8 months ago

@long2ice done! Big thanks for a quick reply.