Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#1102)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Steven Silvester <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and blink1073 authored Nov 29, 2022
1 parent fe8cf72 commit 96bcdbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: check-case-conflict
Expand Down Expand Up @@ -61,7 +61,7 @@ repos:
stages: [manual]

- repo: https://github.com/john-hen/Flake8-pyproject
rev: 1.2.0
rev: 1.2.1
hooks:
- id: Flake8-pyproject
alias: flake8
Expand Down
2 changes: 1 addition & 1 deletion jupyter_server/base/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class WebSocketMixin:
ping_callback = None
last_ping = 0.0
last_pong = 0.0
stream = None # type: Optional[IOStream]
stream: Optional[IOStream] = None

@property
def ping_interval(self):
Expand Down
7 changes: 5 additions & 2 deletions jupyter_server/gateway/gateway_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from abc import ABC, ABCMeta, abstractmethod
from datetime import datetime
from email.utils import parsedate_to_datetime
from http.cookies import Morsel, SimpleCookie
from http.cookies import SimpleCookie
from socket import gaierror

from tornado import web
Expand All @@ -26,6 +26,9 @@
)
from traitlets.config import LoggingConfigurable, SingletonConfigurable

if ty.TYPE_CHECKING:
from http.cookies import Morsel


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

# store of cookies with store time
self._cookies = {} # type: ty.Dict[str, ty.Tuple[Morsel, datetime]]
self._cookies: ty.Dict[str, ty.Tuple[Morsel, datetime]] = {}

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

0 comments on commit 96bcdbb

Please sign in to comment.