make black[jupyter] installation cross-shell (#3394)

This commit is contained in:
Marco Edward Gorelli 2022-12-10 19:49:33 +00:00 committed by GitHub
parent 96e62c57e3
commit 16b98abca9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ Try it out now using the [Black Playground](https://black.vercel.app). Watch the
### Installation ### Installation
_Black_ can be installed by running `pip install black`. It requires Python 3.7+ to run. _Black_ can be installed by running `pip install black`. It requires Python 3.7+ to run.
If you want to format Jupyter Notebooks, install with `pip install 'black[jupyter]'`. If you want to format Jupyter Notebooks, install with `pip install "black[jupyter]"`.
If you can't wait for the latest _hotness_ and want to install from GitHub, use: If you can't wait for the latest _hotness_ and want to install from GitHub, use:

View File

@ -17,7 +17,7 @@ Also, you can try out _Black_ online for minimal fuss on the
## Installation ## Installation
_Black_ can be installed by running `pip install black`. It requires Python 3.7+ to run. _Black_ can be installed by running `pip install black`. It requires Python 3.7+ to run.
If you want to format Jupyter Notebooks, install with `pip install 'black[jupyter]'`. If you want to format Jupyter Notebooks, install with `pip install "black[jupyter]"`.
If you can't wait for the latest _hotness_ and want to install from GitHub, use: If you can't wait for the latest _hotness_ and want to install from GitHub, use:

View File

@ -64,7 +64,7 @@ def jupyter_dependencies_are_installed(*, verbose: bool, quiet: bool) -> bool:
if verbose or not quiet: if verbose or not quiet:
msg = ( msg = (
"Skipping .ipynb files as Jupyter dependencies are not installed.\n" "Skipping .ipynb files as Jupyter dependencies are not installed.\n"
"You can fix this by running ``pip install black[jupyter]``" 'You can fix this by running ``pip install "black[jupyter]"``'
) )
out(msg) out(msg)
return False return False

View File

@ -17,7 +17,7 @@ def test_ipynb_diff_with_no_change_single() -> None:
result = runner.invoke(main, [str(path)]) result = runner.invoke(main, [str(path)])
expected_output = ( expected_output = (
"Skipping .ipynb files as Jupyter dependencies are not installed.\n" "Skipping .ipynb files as Jupyter dependencies are not installed.\n"
"You can fix this by running ``pip install black[jupyter]``\n" 'You can fix this by running ``pip install "black[jupyter]"``\n'
) )
assert expected_output in result.output assert expected_output in result.output
@ -32,6 +32,6 @@ def test_ipynb_diff_with_no_change_dir(tmp_path: pathlib.Path) -> None:
result = runner.invoke(main, [str(tmp_path)]) result = runner.invoke(main, [str(tmp_path)])
expected_output = ( expected_output = (
"Skipping .ipynb files as Jupyter dependencies are not installed.\n" "Skipping .ipynb files as Jupyter dependencies are not installed.\n"
"You can fix this by running ``pip install black[jupyter]``\n" 'You can fix this by running ``pip install "black[jupyter]"``\n'
) )
assert expected_output in result.output assert expected_output in result.output