Skip to content

Commit bd009e5

Browse files
committed
get pyrefly green
1 parent 9e386ef commit bd009e5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

nbqa/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ def _main(cli_args: CLIArgs, configs: Configs) -> int:
770770
for key, i in nb_to_tmp_mapping.items()
771771
if key
772772
not in (
773-
*saved_sources.failed_notebooks,
773+
*saved_sources.failed_notebooks, # type: ignore[not-a-type, unused-ignore]
774774
*saved_sources.non_python_notebooks,
775775
)
776776
],

nbqa/path_utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import string
66
from pathlib import Path
7-
from typing import Any, Dict, Optional, Tuple
7+
from typing import Any, Dict, Optional, Tuple, cast
88

99

1010
def remove_prefix(string_: str, prefix: str) -> str:
@@ -106,7 +106,10 @@ def read_notebook(notebook: str) -> Tuple[Optional[Dict[str, Any]], Optional[boo
106106
config = None
107107

108108
try:
109-
md_content = jupytext.jupytext.read(notebook, config=config) # type: ignore[missing-attribute,unused-ignore]
109+
# jupytext isn't typed unfortunately
110+
md_content = cast( # type: ignore[missing-attribute,unused-ignore]
111+
Any, jupytext.jupytext.read(notebook, config=config)
112+
)
110113
except: # noqa: E72a # pylint: disable=bare-except
111114
return None, None
112115

0 commit comments

Comments
 (0)