Skip to content

Commit

Permalink
fix pre-commit errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsailer committed Nov 18, 2022
1 parent a2bbbe7 commit 4f520d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
11 changes: 1 addition & 10 deletions jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import webbrowser
from base64 import encodebytes

from jupyter_client import KernelManager
from jupyter_client.kernelspec import KernelSpecManager
from jupyter_client.manager import KernelManager
from jupyter_client.session import Session
Expand Down Expand Up @@ -96,10 +95,7 @@
AsyncFileContentsManager,
FileContentsManager,
)
from jupyter_server.services.contents.largefilemanager import (
AsyncLargeFileManager,
LargeFileManager,
)
from jupyter_server.services.contents.largefilemanager import AsyncLargeFileManager
from jupyter_server.services.contents.manager import (
AsyncContentsManager,
ContentsManager,
Expand All @@ -115,7 +111,6 @@
MappingKernelManager,
)
from jupyter_server.services.sessions.sessionmanager import SessionManager
from jupyter_server.traittypes import TypeFromClasses
from jupyter_server.utils import (
check_pid,
fetch,
Expand Down Expand Up @@ -148,10 +143,6 @@
raise ImportError(_i18n("The Jupyter Server requires tornado >=%s.%s.%s") % MIN_TORNADO) from e


if not sys.platform.startswith("win"):
from tornado.netutil import bind_unix_socket


try:
import resource
except ImportError:
Expand Down
9 changes: 0 additions & 9 deletions jupyter_server/services/kernels/websocket.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
"""Tornado handlers for WebSocket <-> ZMQ sockets."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import json
import re
import struct
import sys
from typing import Optional, no_type_check
from urllib.parse import urlparse

try:
from jupyter_client.jsonutil import json_default
except ImportError:
from jupyter_client.jsonutil import date_default as json_default

from jupyter_client.jsonutil import extract_dates
from tornado import ioloop, web
from tornado.iostream import IOStream
from tornado.websocket import WebSocketHandler
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,7 @@ extend-ignore = [
per-file-ignores = [
# B011: Do not call assert False since python -O removes these calls
# F841 local variable 'foo' is assigned to but never used
"tests/*: B011, F841"]
"tests/*: B011, F841",
# Ignore flake 8 errors from shimmed imports
"jupyter_server/base/zmqhandlers.py:F401"
]

0 comments on commit 4f520d1

Please sign in to comment.