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

Allow passing custom header for websocket handshake. Change pre-commi… #144

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

zuczkows
Copy link
Collaborator

…t flake8 URL.

@zuczkows zuczkows requested a review from kacperf531 December 27, 2024 13:56
@zuczkows zuczkows self-assigned this Dec 27, 2024
def __init__(
self,
url: str,
header: Union[list, dict, Callable, None],
Copy link
Collaborator

Choose a reason for hiding this comment

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

opt: use typing.Optional

Optional[X] is equivalent to Union[X, None].

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is copied from WebSocketApp client that is used in our SDK

class WebSocketApp:
    """
    Higher level of APIs are provided. The interface is like JavaScript WebSocket object.
    """

    def __init__(
        self,
        url: str,
        header: Union[list, dict, Callable, None] = None,

@zuczkows zuczkows merged commit 22dbad9 into master Dec 30, 2024
1 check passed
@zuczkows zuczkows deleted the add-custom-header-to-ws-handshake branch December 30, 2024 07:45
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