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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

502E532E
Copy link

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant