-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Stub generator for proxy classes does not generate overload stubs #1147
Comments
vfazio
added a commit
to vfazio/alembic
that referenced
this issue
Dec 29, 2022
Add support for generating @overload type stubs for proxied classes. This should fix typing issues with overloaded functions such as `context.get_x_argument` that narrow return types based on parameters. Fixes: sqlalchemy#1147 Signed-off-by: Vincent Fazio <vfazio@gmail.com>
3 tasks
CaselIT
added
bug
Something isn't working
pep 484
typing related issues
and removed
requires triage
New issue that requires categorization
labels
Dec 30, 2022
Hi, this seems a duplicate of #1146. We can continue to the other one |
vfazio
added a commit
to vfazio/alembic
that referenced
this issue
Dec 30, 2022
Add support for generating @overload type stubs for proxied classes. This should fix typing issues with overloaded functions such as `context.get_x_argument` that narrow return types based on parameters. Fixes: sqlalchemy#1147 Signed-off-by: Vincent Fazio <vfazio@gmail.com>
vfazio
added a commit
to vfazio/alembic
that referenced
this issue
Dec 30, 2022
Add support for generating @overload type stubs for proxied classes. This should fix typing issues with overloaded functions such as `context.get_x_argument` that narrow return types based on parameters. Fixes: sqlalchemy#1147 Signed-off-by: Vincent Fazio <vfazio@gmail.com>
vfazio
added a commit
to vfazio/alembic
that referenced
this issue
Dec 30, 2022
Add support for generating @overload type stubs for proxied classes. This should fix typing issues with overloaded functions such as `context.get_x_argument` that narrow return types based on parameters. Fixes: sqlalchemy#1147 Signed-off-by: Vincent Fazio <vfazio@gmail.com>
sqlalchemy-bot
pushed a commit
that referenced
this issue
Jan 3, 2023
<!-- Provide a general summary of your proposed changes in the Title field above --> ### Description Closes #1146 Closes #1147 <!-- Describe your changes in detail --> Overloaded functions would not have type stubs generated by the stub generator for proxied classes. Now they will. ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [x] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. Closes: #1148 Pull-request: #1148 Pull-request-sha: ed3c28c Change-Id: I7c0ee9d333015174ee6ab754909748f745af2ff9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The stub generator for proxy classes (
tools/write_pyi.py
) does not generate overload stubsExpected behavior
To accurately reflect the typing of the proxied classes, the overloads should be stubbed out.
The text was updated successfully, but these errors were encountered: