Skip to content

Commit

Permalink
Fix terminal usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Jul 10, 2020
1 parent ceabe53 commit f82d3da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/quick_start/1.-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For a fully isolated user installation you can use [pipx](https://github.com/pip

`pipx install isort`

<script id="asciicast-tCfIczk0HS4N8iM7g1TwEUB7y" src="https://asciinema.org/a/tCfIczk0HS4N8iM7g1TwEUB7y.js" async></script>
<script id="asciicast-qZglwdh3YdoRHjtpxuNmQJehj" src="https://asciinema.org/a/qZglwdh3YdoRHjtpxuNmQJehj.js" async></script>

!!!tip
If you want isort to act as a linter for projects, it probably makes since to add isort as an explicit development dependency for each project that uses it. If, on the other hand, you are an individual developer simply using isort as a personal tool to clean up your own commits, a global or user level installation makes sense. Both are seamlessly supported on a single machine.
10 changes: 5 additions & 5 deletions docs/quick_start/2.-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@

Once installed, `isort` exposes a command line utility for sorting, organizing, and formatting imports within Python and Cython source files.

To verify the tool is installed correctly, run `isort --version` from the command line and you should be given the available commands and the version of isort installed.
To verify the tool is installed correctly, run `isort` from the command line and you should be given the available commands and the version of isort installed.
For a list of all CLI options type `isort --help` or view [the online configuration reference](http://127.0.0.1:8000/docs/configuration/options/).:

<script id="asciicast-RgDc2o0URNsh2jXAOPsGxN7Kq" src="https://asciinema.org/a/RgDc2o0URNsh2jXAOPsGxN7Kq.js" async></script>
<script id="asciicast-346599" src="https://asciinema.org/a/346599.js" async></script>

## Formatting a Project

In general, isort is most commonly utilized across an entire projects source at once. The simplest way to do this is `isort .` or if using a `src` directory `isort src`. isort will automatically find all Python source files recursively and pick-up a configuration file placed at the root of your project if present. This can be combined with any command line configuration customizations such as specifying a profile to use (`isort . --profile black`).

<script id="asciicast-3bLYNjlnk14eLrRFgCL5gCpFt" src="https://asciinema.org/a/3bLYNjlnk14eLrRFgCL5gCpFt.js" async></script>
<script id="asciicast-346600" src="https://asciinema.org/a/346600.js" async></script>

## Verifying a Project

The second most common usage of isort is verifying that imports within a project are formatted correctly (often within the context of a CI/CD system). The simplest way to accomplish this is using the check command line option: `isort --check .`. To improve the usefulness of errors when they do occur, this can be combined with the diff option: `isort --check --diff .`.

<script id="asciicast-g4tyWhblyJqgq1BTyrC9MxpbD" src="https://asciinema.org/a/g4tyWhblyJqgq1BTyrC9MxpbD.js" async></script>
<script id="asciicast-346601" src="https://asciinema.org/a/346601.js" async></script>

## Single Source Files

Finally, isort can just as easily be ran against individual source files. Simply pass in a single or multiple source files to sort or validate (Example: `isort setup.py`).

<script id="asciicast-WEVnVpy0F9dTH8TSHofwPVcK3" src="https://asciinema.org/a/WEVnVpy0F9dTH8TSHofwPVcK3.js" async></script>
<script id="asciicast-346602" src="https://asciinema.org/a/346602.js" async></script>

## Multiple Projects

Expand Down
2 changes: 1 addition & 1 deletion docs/quick_start/3.-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In addition to the powerful command line interface, isort exposes a complete Pyt

To use the Python API, `import isort` and then call the desired function call:

<script id="asciicast-ZpXMZU4TY5Wnti83ER6KBJIeU" src="https://asciinema.org/a/ZpXMZU4TY5Wnti83ER6KBJIeU.js" async></script>
<script id="asciicast-346604" src="https://asciinema.org/a/346604.js" async></script>

Every function is fully type hinted and requires and returns only builtin Python objects.

Expand Down

0 comments on commit f82d3da

Please sign in to comment.