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

Import all types in __init__ #564

Open
jamesroseman opened this issue May 1, 2024 · 5 comments
Open

Import all types in __init__ #564

jamesroseman opened this issue May 1, 2024 · 5 comments
Assignees
Labels
code-quality Affects the developer experience when working in our codebase.

Comments

@jamesroseman
Copy link

jamesroseman commented May 1, 2024

Working with ably Python SDK has been pretty painless so far, except that very few of the types that are defined in ably/types are available to me, the developer.

I propose expanding the imports in init to include most (all?) types defined in ably/types.

For example: it is not possible to create a variable to store a Realtime channel with a correct type definition.

┆Issue is synchronized with this Jira Task by Unito

@jamesroseman
Copy link
Author

A concrete example:

`import ably

channel: ably.realtime.realtime_channel.RealtimeChannel`

This doesn't work.

`from ably.realtime.realtime_channel import RealtimeChannel

channel: RealtimeChannel`

This does.

@sacOO7 sacOO7 self-assigned this May 1, 2024
@sacOO7 sacOO7 added the code-quality Affects the developer experience when working in our codebase. label May 1, 2024
@sacOO7
Copy link
Collaborator

sacOO7 commented May 1, 2024

Related to #528

@sacOO7
Copy link
Collaborator

sacOO7 commented May 1, 2024

Hi @jamesroseman, Thanks for reporting the issue!
We do have pending issue to add strong type support. We will try to include fix for the same in future release 👍

@jamesroseman
Copy link
Author

It seems like that issue has been open for 241 days. Any indication on a timeline? I'm doing some prototyping to evaluate an Ably solution and having type support would greatly impact my assessment of its suitability. It doesn't seem like a big lift. I'd offer to put up a PR myself but it seems the last PR set to address this issue was reverted a few weeks after it was merged.

@sacOO7
Copy link
Collaborator

sacOO7 commented May 1, 2024

@jamesroseman feel free to open the PR. We will be happy to review and merge it as long as it doesn't impact/break for existing users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Affects the developer experience when working in our codebase.
Development

No branches or pull requests

2 participants