Visitar URL original
Import all types in __init__ · Issue #564 · ably/ably-pubsub-python · GitHub
Skip to content

Import all types in __init__ #564

Description

@jamesroseman

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

Activity

  1. jamesroseman commented on May 1, 2024

    @jamesroseman
    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.

  2. self-assigned this
    on May 1, 2024
  3. added
    code-qualityAffects the developer experience when working in our codebase.
    on May 1, 2024
  4. sacOO7 commented on May 1, 2024

    @sacOO7
    Contributor

    Related to #528

  5. sacOO7 commented on May 1, 2024

    @sacOO7
    Contributor

    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 👍

  6. jamesroseman commented on May 1, 2024

    @jamesroseman
    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.

  7. sacOO7 commented on May 1, 2024

    @sacOO7
    Contributor

    @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

Metadata

Metadata

Assignees

Labels

code-qualityAffects the developer experience when working in our codebase.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions