tortoise / tortoise-orm

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

Add __all__ to __init__.py for type checkers #1493

Closed zmievsa closed 1 year ago

zmievsa commented 1 year 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 1 year 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 1 year ago

Thanks! Just need resolve conflicts.

zmievsa commented 1 year ago

@long2ice done! Big thanks for a quick reply.