Skip to content

Commit

Permalink
Rename isort command to format:imports
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjj committed Oct 29, 2022
1 parent 350924c commit 9fad28d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/).

- Ability to customize `UID` and `GID` if you're not using `1000:1000` (check the `.env.example` file)
- Output `docker compose logs` in CI for easier debugging
- `isort` to auto-sort Python imports and a new `./run isort` command
- `./run quality` to run `lint`, `isort` and `format` in 1 command
- `isort` to auto-sort Python imports and a new `./run format:imports` command
- `./run quality` to run all lint and format commands in 1 command

### Changed

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Visit <http://localhost:8000> in your favorite browser.

```sh
# You should see that everything is unchanged (imports are already formatted).
./run isort
./run format:imports
```

#### Formatting the code base:
Expand Down
8 changes: 4 additions & 4 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function lint {
cmd flake8 "${@}"
}

function isort {
function format:imports {
# Sort Python imports
cmd isort . "${@}"
}
Expand All @@ -62,9 +62,9 @@ function format {

function quality {
# Perform all code quality commands together
lint
isort
format:imports
format
lint
}

function test {
Expand Down Expand Up @@ -173,7 +173,7 @@ function ci:test {
docker compose logs

lint "${@}"
isort --check
format:imports --check
format --check
flask db reset --with-testdb
test "${@}"
Expand Down

0 comments on commit 9fad28d

Please sign in to comment.