@@ -107,37 +107,24 @@ dependencies = ["coverage", "pytest-cov"]
107
107
test = " python -m pytest -vv --cov jupyterlab_server --cov-branch --cov-report term-missing:skip-covered {args}"
108
108
nowarn = " test -W default {args}"
109
109
110
- [tool .hatch .envs .typing ]
111
- features = [" test" ]
112
- dependencies = [" mypy>=1.6.1" , " traitlets>=5.11.2" , " jupyter_server>=2.8" ]
113
- [tool .hatch .envs .typing .scripts ]
114
- test = " mypy --install-types --non-interactive {args}"
115
-
116
110
[tool .hatch .envs .lint ]
117
- dependencies = [
118
- " mdformat>0.7" ,
119
- " mdformat-gfm>=0.3.5" ,
120
- " ruff==0.1.3"
121
- ]
122
111
detached = true
112
+ dependencies = [" pre-commit" ]
123
113
[tool .hatch .envs .lint .scripts ]
124
- style = [
125
- " ruff {args:.}" ,
126
- " ruff format {args:.}" ,
127
- " mdformat --check {args:docs *.md}"
128
- ]
129
- fmt = [
130
- " ruff --fix {args:.}" ,
131
- " ruff format {args:.}" ,
132
- " mdformat {args:docs *.md}"
133
- ]
114
+ build = " pre-commit run --all-files ruff"
115
+
116
+ [tool .hatch .envs .typing ]
117
+ dependencies = [ " pre-commit" ]
118
+ detached = true
119
+ [tool .hatch .envs .typing .scripts ]
120
+ test = " pre-commit run --all-files --hook-stage manual mypy"
134
121
135
122
[tool .pytest .ini_options ]
136
123
minversion = " 6.0"
137
124
xfail_strict = true
138
125
log_cli_level = " info"
139
126
addopts = [
140
- " -raXs " , " --durations=10" , " --color=yes" , " --doctest-modules" ,
127
+ " -ra " , " --durations=10" , " --color=yes" , " --doctest-modules" ,
141
128
" --showlocals" , " --strict-markers" , " --strict-config"
142
129
]
143
130
testpaths = [
@@ -155,8 +142,7 @@ filterwarnings = [
155
142
# From tornado.netutil.bind_sockets
156
143
" module:unclosed <socket.socket:ResourceWarning" ,
157
144
# From jupyter_client
158
- " module:datetime.datetime.utcfromtimestamp:DeprecationWarning" ,
159
- " module:datetime.datetime.utcnow:DeprecationWarning" ,
145
+ " module:datetime.datetime.utc:DeprecationWarning" ,
160
146
]
161
147
162
148
[tool .coverage .report ]
@@ -280,4 +266,4 @@ relative_files = true
280
266
source = [" jupyterlab_server" ]
281
267
282
268
[tool .repo-review ]
283
- ignore = [" PY007" , " PP308 " , " GH102" , " PC140 " ]
269
+ ignore = [" PY007" , " GH102" ]
0 commit comments