Skip to content

Commit 4c4a229

Browse files
committed
Remove TYPE_CHECKING, add ignore of TCH on gateway files
1 parent 5523269 commit 4c4a229

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

jupyter_server/gateway/gateway_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from jupyter_events import EventLogger
1919
from tornado import web
2020
from tornado.httpclient import AsyncHTTPClient, HTTPClientError, HTTPResponse
21+
from tornado.httputil import HTTPHeaders
2122
from traitlets import (
2223
Bool,
2324
Float,
@@ -34,9 +35,6 @@
3435

3536
from jupyter_server import DEFAULT_EVENTS_SCHEMA_PATH, JUPYTER_SERVER_EVENTS_URI
3637

37-
if ty.TYPE_CHECKING:
38-
from tornado.httputil import HTTPHeaders
39-
4038
ERROR_STATUS = "error"
4139
SUCCESS_STATUS = "success"
4240
STATUS_KEY = "status"

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ unfixable = [
156156
[tool.ruff.lint.extend-per-file-ignores]
157157
"jupyter_server/*" = ["S101", "RET", "S110", "UP031", "FBT", "FA100", "SLF001", "A002",
158158
"SIM105", "A001", "UP007", "PLR2004", "T201", "N818", "F403"]
159+
"jupyter_server/gateway/*" = ["TCH" ]
159160
"tests/*" = ["UP031", "PT", 'EM', "TRY", "RET", "SLF", "C408", "F841", "FBT", "A002", "FLY", "N",
160161
"PERF", "ASYNC", "T201", "FA100", "E711", "INP", "TCH", "SIM105", "A001", "PLW0603"]
161162
"examples/*_config.py" = ["F821"]

0 commit comments

Comments
 (0)