Skip to content

Flask-SocketIO: annotate free-function signatures to match SocketIO methods#16009

Merged
srittau merged 1 commit into
python:mainfrom
Wlwool:flask-socketio-annotate-free-functions
Jul 12, 2026
Merged

Flask-SocketIO: annotate free-function signatures to match SocketIO methods#16009
srittau merged 1 commit into
python:mainfrom
Wlwool:flask-socketio-annotate-free-functions

Conversation

@Wlwool

@Wlwool Wlwool commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

The module-level free functions emit, join_room, leave_room, and close_room in flask_socketio/init.pyi had unannotated event/room parameters, while the equivalent SocketIO class methods already had these typed as str.
These free functions are thin wrappers around the corresponding SocketIO methods, so the types should match. Confirmed against usage examples in the upstream python-socketio documentation and existing str-typed params in namespace.pyi.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit b87a974 into python:main Jul 12, 2026
44 checks passed
@Wlwool Wlwool deleted the flask-socketio-annotate-free-functions branch July 12, 2026 15:32
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