Skip to content

Commit 96bcdbb

Browse files
[pre-commit.ci] pre-commit autoupdate (#1102)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
1 parent fe8cf72 commit 96bcdbb

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.3.0
6+
rev: v4.4.0
77
hooks:
88
- id: end-of-file-fixer
99
- id: check-case-conflict
@@ -61,7 +61,7 @@ repos:
6161
stages: [manual]
6262

6363
- repo: https://github.com/john-hen/Flake8-pyproject
64-
rev: 1.2.0
64+
rev: 1.2.1
6565
hooks:
6666
- id: Flake8-pyproject
6767
alias: flake8

jupyter_server/base/websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class WebSocketMixin:
1515
ping_callback = None
1616
last_ping = 0.0
1717
last_pong = 0.0
18-
stream = None # type: Optional[IOStream]
18+
stream: Optional[IOStream] = None
1919

2020
@property
2121
def ping_interval(self):

jupyter_server/gateway/gateway_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from abc import ABC, ABCMeta, abstractmethod
99
from datetime import datetime
1010
from email.utils import parsedate_to_datetime
11-
from http.cookies import Morsel, SimpleCookie
11+
from http.cookies import SimpleCookie
1212
from socket import gaierror
1313

1414
from tornado import web
@@ -26,6 +26,9 @@
2626
)
2727
from traitlets.config import LoggingConfigurable, SingletonConfigurable
2828

29+
if ty.TYPE_CHECKING:
30+
from http.cookies import Morsel
31+
2932

3033
class GatewayTokenRenewerMeta(ABCMeta, type(LoggingConfigurable)): # type: ignore
3134
"""The metaclass necessary for proper ABC behavior in a Configurable."""
@@ -518,7 +521,7 @@ def __init__(self, **kwargs):
518521
self.gateway_token_renewer = self.gateway_token_renewer_class(parent=self, log=self.log)
519522

520523
# store of cookies with store time
521-
self._cookies = {} # type: ty.Dict[str, ty.Tuple[Morsel, datetime]]
524+
self._cookies: ty.Dict[str, ty.Tuple[Morsel, datetime]] = {}
522525

523526
def init_connection_args(self):
524527
"""Initialize arguments used on every request. Since these are primarily static values,

0 commit comments

Comments
 (0)