@@ -156,9 +156,9 @@ def test_check_stdin(
156156 expect_exit : bool ,
157157 request : pytest .FixtureRequest ,
158158) -> None :
159- notebook = cast (nbformat .NotebookNode , request .getfixturevalue (notebook_name ))
159+ notebook = cast (" nbformat.NotebookNode" , request .getfixturevalue (notebook_name ))
160160 monkeypatch .setattr (sys , "argv" , ["nb-clean" , "check" ])
161- content = cast (str , nbformat .writes (notebook )) # pyright: ignore[reportUnknownMemberType]
161+ content = cast (" str" , nbformat .writes (notebook )) # pyright: ignore[reportUnknownMemberType]
162162 monkeypatch .setattr (sys , "stdin" , io .StringIO (content ))
163163 if expect_exit :
164164 with pytest .raises (SystemExit ) as exc :
@@ -177,11 +177,11 @@ def test_clean_file(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
177177 nb_clean .cli .main ()
178178
179179 cleaned = cast (
180- nbformat .NotebookNode ,
180+ " nbformat.NotebookNode" ,
181181 nbformat .read (dst_dirty , as_version = nbformat .NO_CONVERT ), # pyright: ignore[reportUnknownMemberType]
182182 )
183183 expected = cast (
184- nbformat .NotebookNode ,
184+ " nbformat.NotebookNode" ,
185185 nbformat .read ( # pyright: ignore[reportUnknownMemberType]
186186 Path ("tests/notebooks/clean.ipynb" ), as_version = nbformat .NO_CONVERT
187187 ),
@@ -193,26 +193,26 @@ def test_clean_stdin(
193193 capsys : CaptureFixture [str ], monkeypatch : pytest .MonkeyPatch
194194) -> None :
195195 dirty = cast (
196- nbformat .NotebookNode ,
196+ " nbformat.NotebookNode" ,
197197 nbformat .read ( # pyright: ignore[reportUnknownMemberType]
198198 Path ("tests/notebooks/dirty.ipynb" ), as_version = nbformat .NO_CONVERT
199199 ),
200200 )
201201 expected = cast (
202- nbformat .NotebookNode ,
202+ " nbformat.NotebookNode" ,
203203 nbformat .read ( # pyright: ignore[reportUnknownMemberType]
204204 Path ("tests/notebooks/clean.ipynb" ), as_version = nbformat .NO_CONVERT
205205 ),
206206 )
207207
208208 monkeypatch .setattr (sys , "argv" , ["nb-clean" , "clean" ])
209- dirty_content = cast (str , nbformat .writes (dirty )) # pyright: ignore[reportUnknownMemberType]
209+ dirty_content = cast (" str" , nbformat .writes (dirty )) # pyright: ignore[reportUnknownMemberType]
210210 monkeypatch .setattr (sys , "stdin" , io .StringIO (dirty_content ))
211211
212212 nb_clean .cli .main ()
213213
214214 out = capsys .readouterr ().out
215- expected_text = cast (str , nbformat .writes (expected )) # pyright: ignore[reportUnknownMemberType]
215+ expected_text = cast (" str" , nbformat .writes (expected )) # pyright: ignore[reportUnknownMemberType]
216216 assert out .strip () == expected_text .strip ()
217217
218218
@@ -231,7 +231,7 @@ def test_clean_stdin(
231231 ("add-filter -e" , [], True , False , None , False , False , False ),
232232 (
233233 "check -m -o a.ipynb b.ipynb" ,
234- "a.ipynb b.ipynb" . split () ,
234+ [ "a.ipynb" , " b.ipynb"] ,
235235 False ,
236236 False ,
237237 [],
@@ -241,7 +241,7 @@ def test_clean_stdin(
241241 ),
242242 (
243243 "check -m tags -o a.ipynb b.ipynb" ,
244- "a.ipynb b.ipynb" . split () ,
244+ [ "a.ipynb" , " b.ipynb"] ,
245245 False ,
246246 False ,
247247 ["tags" ],
@@ -251,7 +251,7 @@ def test_clean_stdin(
251251 ),
252252 (
253253 "check -m tags special -o a.ipynb b.ipynb" ,
254- "a.ipynb b.ipynb" . split () ,
254+ [ "a.ipynb" , " b.ipynb"] ,
255255 False ,
256256 False ,
257257 ["tags" , "special" ],
0 commit comments