File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 22
22
from types import TracebackType
23
23
24
24
from _typeshed import WriteableBuffer
25
+ from typing_extensions import Self
25
26
26
27
ModeRT = ty .Literal ['r' , 'rt' ]
27
28
ModeRB = ty .Literal ['rb' ]
@@ -246,7 +247,7 @@ def close_if_mine(self) -> None:
246
247
if self .me_opened :
247
248
self .close ()
248
249
249
- def __enter__ (self ) -> Opener :
250
+ def __enter__ (self ) -> Self :
250
251
return self
251
252
252
253
def __exit__ (
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ select = [
123
123
" I" ,
124
124
" PIE" ,
125
125
" PLE" ,
126
+ " PYI" ,
126
127
" Q" ,
127
128
" RSE" ,
128
129
" TCH" ,
@@ -143,6 +144,7 @@ ignore = [
143
144
" C408" ,
144
145
" C416" ,
145
146
" PIE790" ,
147
+ " PYI024" ,
146
148
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
147
149
" W191" ,
148
150
" E111" ,
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ deps =
181
181
numpy
182
182
pyzstd
183
183
importlib_resources
184
+ typing_extensions
184
185
skip_install = true
185
186
commands =
186
187
mypy nibabel
You can’t perform that action at this time.
0 commit comments