Skip to content

Update SQLAlchemy stubs for 1.4.30 #6973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class AsyncAdapt_asyncmy_dbapi:
asyncmy: Any
pymysql: Any
paramstyle: str
def __init__(self, asyncmy, pymysql) -> None: ...
def __init__(self, asyncmy: Any) -> None: ...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this annotated with Any as opposed to not being annotated at all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets passed the asyncmy module. I don't think we have a proper way to annotate this, except for maybe using ModuleType, which doesn't seem right either.

def connect(self, *arg, **kw): ...

class MySQLDialect_asyncmy(MySQLDialect_pymysql):
Expand Down
1 change: 1 addition & 0 deletions stubs/SQLAlchemy/sqlalchemy/orm/util.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class AliasedInsp(ORMEntityColumnsClauseRole, ORMFromClauseRole, sql_base.Memoiz
_use_mapper_path,
adapt_on_names,
represents_outer_join,
nest_adapters: bool, # added in 1.4.30
) -> None: ...
@property
def entity(self): ...
Expand Down