Skip to content

Add comprehensive type stubs to improve Python import#21

Merged
PaarthShah merged 3 commits intomatrix-nio:mainfrom
TrevisGordan:python-typing-stubs
Aug 26, 2025
Merged

Add comprehensive type stubs to improve Python import#21
PaarthShah merged 3 commits intomatrix-nio:mainfrom
TrevisGordan:python-typing-stubs

Conversation

@TrevisGordan
Copy link
Contributor

I did some improvements on typing support:

  • Add complete type stubs (.pyi files) for all classes and exceptions with proper type annotations
  • Fix import recognition in IDEs through explicit __all__ list and py.typed marker
  • Add module documentation in Rust that inherits to Python for better help() output

Fixes:

  • ✅ IDE autocompletion and type checking now work correctly
  • from vodozemac import Account, PickleException properly recognized

@PaarthShah PaarthShah self-requested a review July 27, 2025 21:07
Copy link
Collaborator

@PaarthShah PaarthShah left a comment

Choose a reason for hiding this comment

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

Tentatively looks good! I'd gotten about halfway on this before getting distracted; I'm gonna test out a few potential simplifications soon locally just in case, but I think this is probably mostly good

@PaarthShah PaarthShah self-requested a review July 27, 2025 21:08
@PaarthShah PaarthShah added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 27, 2025
@PaarthShah PaarthShah merged commit 489c28f into matrix-nio:main Aug 26, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants