(*, warn: bool)
| 49 | |
| 50 | @lru_cache |
| 51 | def jupyter_dependencies_are_installed(*, warn: bool) -> bool: |
| 52 | installed = ( |
| 53 | find_spec("tokenize_rt") is not None and find_spec("IPython") is not None |
| 54 | ) |
| 55 | if not installed and warn: |
| 56 | msg = ( |
| 57 | "Skipping .ipynb files as Jupyter dependencies are not installed.\n" |
| 58 | 'You can fix this by running ``pip install "black[jupyter]"``' |
| 59 | ) |
| 60 | out(msg) |
| 61 | return installed |
| 62 | |
| 63 | |
| 64 | def validate_cell(src: str, mode: Mode) -> None: |
no test coverage detected