Skip to content

Conversation

Paillat-dev
Copy link
Member

@Paillat-dev Paillat-dev commented Dec 12, 2024

Summary

Allows usage of functions with any number of optional parameters as autocomplete. This allows by extent the usage of partials and similar as autocomplete.

Fixes #2668

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@Paillat-dev Paillat-dev requested a review from a team as a code owner December 12, 2024 22:10
@pullapprove4 pullapprove4 bot requested a review from Middledot December 12, 2024 22:10
@Paillat-dev Paillat-dev changed the title ✨ Allow for functools.partials and such as autocomplete feat: ✨ Allow for functools.partials and such as autocomplete Dec 12, 2024
@Paillat-dev
Copy link
Member Author

@DefiDebauchery Would you mind testing this pr with your usecase and functools.partial?

@DefiDebauchery
Copy link
Contributor

@DefiDebauchery Would you mind testing this pr with your usecase and functools.partial?

Yes, this did work on my side, thank you! While I also like the solution offered in #2668 (comment), I do think partials make sense in many contexts, and it would be great to have support for those who need something quick.

@plun1331
Copy link
Member

https://discord.com/channels/881207955029110855/881735314987708456/1316992273476747375

@Paillat-dev Paillat-dev changed the title feat: ✨ Allow for functools.partials and such as autocomplete feat: ✨ Allow for functools.partials functions returning an awaitable as autocomplete Dec 13, 2024
@Paillat-dev Paillat-dev changed the title feat: ✨ Allow for functools.partials functions returning an awaitable as autocomplete feat: ✨ Allow for functools.partial functions returning an awaitable as autocomplete Dec 13, 2024
@Paillat-dev Paillat-dev changed the title feat: ✨ Allow for functools.partial functions returning an awaitable as autocomplete feat: ✨ Allow for functools.partial and functions returning an awaitable as autocomplete Dec 13, 2024
@Paillat-dev Paillat-dev marked this pull request as ready for review December 13, 2024 08:08
@Paillat-dev
Copy link
Member Author

Oh shoot checks failing... This is why we should be using Annotated for options...

@Paillat-dev Paillat-dev requested a review from DA-344 December 14, 2024 14:58
@Paillat-dev Paillat-dev requested a review from DA-344 March 2, 2025 21:34
@Lulalaby
Copy link
Member

Lulalaby commented Aug 2, 2025

Merge conflicts

@Paillat-dev
Copy link
Member Author

Fixed

@Lulalaby Lulalaby requested a review from a team as a code owner August 30, 2025 20:33
@Lulalaby Lulalaby force-pushed the master branch 2 times, most recently from b55c125 to 82659b2 Compare August 30, 2025 21:10
@Lulalaby Lulalaby removed the on hold label Aug 30, 2025
@Lulalaby Lulalaby requested a review from a team as a code owner September 1, 2025 12:31
Copy link
Contributor

@DA-344 DA-344 left a comment

Choose a reason for hiding this comment

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

merge conflicts

@Paillat-dev
Copy link
Member Author

tbh I might as well give up this one and make it part of the options rewrite in next

@Lulalaby
Copy link
Member

Lulalaby commented Sep 1, 2025

idk. we dunno when next comes out. i'd prefer if we still have it here

@Paillat-dev
Copy link
Member Author

It's just that I don't really like that code I wrote but at the same time it's mainly because options are spaghetti code

@Paillat-dev Paillat-dev added hold: testing This pull request requires further testing on hold labels Sep 5, 2025
@Paillat-dev
Copy link
Member Author

This breaks autocomplete, please hold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(Somehow) Allow autocomplete methods to accept arguments

7 participants