When env.py is generated, this line is usually added:
from alembic.context import begin_transaction
VSCode (pylance/pyright) compains about it saying:
Type of "begin_transaction" is partially unknown
Most likely because of:
def begin_transaction() -> Union[_ProxyTransaction, ContextManager]:
where the type of ContextManager generic is not specified
Expected behavior
No warnings
Versions.
- OS: MacOS
- Python: 3.11.2
- Alembic: 1.10.1
- SQLAlchemy: 2.0.5.post1
- Database: Postgres 15
- DBAPI: asyncpg
Have a nice day!
When
env.pyis generated, this line is usually added:VSCode (pylance/pyright) compains about it saying:
Type of "begin_transaction" is partially unknownMost likely because of:
where the type of
ContextManagergeneric is not specifiedExpected behavior
No warnings
Versions.
Have a nice day!