Skip to content

Commit e9b18e9

Browse files
Fix lint rule (#1128)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a55bc58 commit e9b18e9

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repos:
3434
- id: black
3535

3636
- repo: https://github.com/charliermarsh/ruff-pre-commit
37-
rev: v0.0.165
37+
rev: v0.0.177
3838
hooks:
3939
- id: ruff
4040
args: ["--fix"]

jupyter_server/extension/application.py

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
from .handler import ExtensionHandlerMixin
1818

19-
2019
# -----------------------------------------------------------------------------
2120
# Util functions and classes.
2221
# -----------------------------------------------------------------------------

pyproject.toml

+9-11
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ test = [
6464
"requests",
6565
"pre-commit"
6666
]
67-
lint = [
68-
"black>=22.6.0",
69-
"mdformat>0.7",
70-
"ruff>=0.0.156",
71-
]
7267
docs = [
7368
# needed because m2r uses deprecated APIs
7469
# m2r is depended on by sphinxcontrib-openapi
@@ -88,9 +83,6 @@ docs = [
8883
"sphinxemoji",
8984
"tornado",
9085
]
91-
typing = [
92-
"mypy>=0.990"
93-
]
9486

9587
[project.scripts]
9688
jupyter-server = "jupyter_server.serverapp:main"
@@ -107,7 +99,8 @@ test = "python -m pytest -vv {args}"
10799
nowarn = "test -W default {args}"
108100

109101
[tool.hatch.envs.typing]
110-
features = ["test", "typing"]
102+
features = ["test"]
103+
dependencies = [ "mypy>=0.990" ]
111104
[tool.hatch.envs.typing.scripts]
112105
test = "mypy --install-types --non-interactive {args:.}"
113106

@@ -120,7 +113,12 @@ nowarn = "test -W default {args}"
120113
integration = "test --integration_tests=true {args}"
121114

122115
[tool.hatch.envs.lint]
123-
features = ["lint"]
116+
detached = true
117+
dependencies = [
118+
"black>=22.10.0",
119+
"mdformat>0.7",
120+
"ruff==0.0.177",
121+
]
124122
[tool.hatch.envs.lint.scripts]
125123
style = [
126124
"ruff {args:.}",
@@ -174,7 +172,7 @@ ignore = [
174172
# Line too long
175173
"E501",
176174
# Relative imports are banned
177-
"I252",
175+
"TID252",
178176
# Boolean ... in function definition
179177
"FBT001",
180178
"FBT002",

tests/services/events/mockextension/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from .mock_extension import _load_jupyter_server_extension # noqa: F401
22

3-
43
# Function that makes these extensions discoverable
54
# by the test functions.
65

0 commit comments

Comments
 (0)