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 2222 from types import TracebackType
2323
2424 from _typeshed import WriteableBuffer
25+ from typing_extensions import Self
2526
2627 ModeRT = ty .Literal ['r' , 'rt' ]
2728 ModeRB = ty .Literal ['rb' ]
@@ -246,7 +247,7 @@ def close_if_mine(self) -> None:
246247 if self .me_opened :
247248 self .close ()
248249
249- def __enter__ (self ) -> Opener :
250+ def __enter__ (self ) -> Self :
250251 return self
251252
252253 def __exit__ (
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ select = [
123123 " I" ,
124124 " PIE" ,
125125 " PLE" ,
126+ " PYI" ,
126127 " Q" ,
127128 " RSE" ,
128129 " TCH" ,
@@ -143,6 +144,7 @@ ignore = [
143144 " C408" ,
144145 " C416" ,
145146 " PIE790" ,
147+ " PYI024" ,
146148 # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
147149 " W191" ,
148150 " E111" ,
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ deps =
181181 numpy
182182 pyzstd
183183 importlib_resources
184+ typing_extensions
184185skip_install = true
185186commands =
186187 mypy nibabel
You can’t perform that action at this time.
0 commit comments