Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

doc: Fix example code in documentation of app.add_websocket#422

Open
502E532E wants to merge 1 commit into
pallets:main from
502E532E:docs_websocket_example_code
Open

doc: Fix example code in documentation of app.add_websocket #422
502E532E wants to merge 1 commit into
pallets:main from
502E532E:docs_websocket_example_code

Conversation

@502E532E

@502E532E 502E532E commented Mar 27, 2025

Copy link
Copy Markdown

The current example code in the documentation assigns a function to the endpoint: str | None argument of add_websocket.
Example code from docs:

def websocket_route():
 ...
app.add_websocket('/', websocket_route)

Function signature:

add_websocket(rule, endpoint=None, view_func=None, **options)

This does not work. I believe the intended way is to assign the function to the view_func parameter and change the corresponding doc entry with this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /