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

Enhance typing for cloud_api decorators #559

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Conversation

ludeeus
Copy link
Contributor

@ludeeus ludeeus commented Feb 5, 2024

The current hints for the decorators, while valid, do not offer much insight.

(function) def async_remote_token(...) -> Awaitable[ClientResponse]

With this change, that becomes:

(function) def async_remote_token(
    Cloud[_ClientT@async_remote_token],
    aes_key: bytes,
    aes_iv: bytes
) -> Coroutine[Any, Any, ClientResponse]

This change also allows passing kwargs to decorated functions that did not work previously.

@MartinHjelmare MartinHjelmare merged commit de21a8b into master Feb 5, 2024
2 checks passed
@MartinHjelmare MartinHjelmare deleted the decorator-typing branch February 5, 2024 11:05
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