-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
folders="baguette tests examples" | ||
|
||
set -x | ||
|
||
# put every import on one line for autoflake remove unused imports | ||
isort baguette tests examples --force-single-line-imports | ||
isort $folders --force-single-line-imports | ||
# remove unused imports and variables | ||
autoflake baguette tests examples --remove-all-unused-imports --recursive --remove-unused-variables --in-place --exclude=__init__.py | ||
autoflake $folders --remove-all-unused-imports --recursive --remove-unused-variables --in-place --exclude=__init__.py | ||
|
||
# format code | ||
black baguette tests examples --line-length 80 | ||
black $folders --line-length 80 | ||
|
||
# resort imports | ||
isort baguette tests examples | ||
isort $folders |