make black[jupyter] installation cross-shell (#3394)
This commit is contained in:
parent
96e62c57e3
commit
16b98abca9
@ -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:
|
||||||
|
|
||||||
|
@ -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:
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user