Skip to content
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

Add generalized methods #93

Merged
merged 5 commits into from
May 16, 2024
Merged

Conversation

mhidalgo-bdai
Copy link
Contributor

This patch builds on top of #92 to introduce generalized methods, functions bound to class instances. This restores user facing type annotations and docstrings for generalized callables used in class (or mixin 👀) context.

@mhidalgo-bdai mhidalgo-bdai self-assigned this May 15, 2024
@mhidalgo-bdai
Copy link
Contributor Author

Still on draft until I'm done with unit tests.

Base automatically changed from mhidalgo-bdai/generalized-callables to main May 15, 2024 18:27
Signed-off-by: Michel Hidalgo <[email protected]>
@mhidalgo-bdai mhidalgo-bdai force-pushed the mhidalgo-bdai/generalized-methods branch from 3cdfb32 to bb32b10 Compare May 15, 2024 18:28
@mhidalgo-bdai mhidalgo-bdai marked this pull request as ready for review May 16, 2024 14:54
@mhidalgo-bdai
Copy link
Contributor Author

Tests added. Ready for review!

Signed-off-by: Michel Hidalgo <[email protected]>


@overload
def generalizedmethod(func: Callable, *, transitional: bool = ...) -> GeneralizedMethod:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def generalizedmethod(func: Callable, *, transitional: bool = ...) -> GeneralizedMethod:
def generalized_method(func: Callable, *, transitional: bool = ...) -> GeneralizedMethod:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 8fbf659.

@mhidalgo-bdai mhidalgo-bdai merged commit 8de80b5 into main May 16, 2024
3 checks passed
@mhidalgo-bdai mhidalgo-bdai deleted the mhidalgo-bdai/generalized-methods branch May 16, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants