Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
scripts: run python scripts through autopep8
  • Loading branch information
jef-n committed Aug 22, 2015
1 parent 81d7ce7 commit 97c8e1a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
27 changes: 14 additions & 13 deletions scripts/astyle.sh
Expand Up @@ -29,20 +29,20 @@ if [ -z "$ASTYLE" ]; then
fi

if ! type -p flip >/dev/null; then
if type -p dos2unix >/dev/null; then
flip() {
dos2unix $2
}
else
echo "flip not found" >&2
flip() {
:
}
fi
if type -p dos2unix >/dev/null; then
flip() {
dos2unix $2
}
else
echo "flip not found" >&2
flip() {
:
}
fi
fi

if ! type -p pep8 >/dev/null; then
pep8() {
if ! type -p autopep8 >/dev/null; then
autopep8() {
:
}
fi
Expand Down Expand Up @@ -92,7 +92,8 @@ for f in "$@"; do
;;

*.py)
cmd="pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701"
#cmd="autopep8 --in-place --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701"
cmd="autopep8 --in-place --ignore=E261,E402,E501"
;;

*.sip)
Expand Down
13 changes: 7 additions & 6 deletions scripts/remove_temporary_files.sh
Expand Up @@ -16,13 +16,14 @@

#
# A simple script to get rid of QGIS related temporary files left in
# your QGIS source folder by git and the prepare-commit script.
# your QGIS source folder by git and the prepare-commit script
# if you don't want to use "prepare-commit.sh -c"

# Tim Sutton, May 2008
find . -name "*.orig" -exec rm -rf {} \;
find . -name "*.prepare" -exec rm -rf {} \;
find . -name "astyle*.diff" -exec rm -rf {} \;
find . -name "*.astyle" -exec rm -rf {} \;
find . -name "sha*.diff" -exec rm -rf {} \;
find . -name "*.orig" -delete
find . -name "*.prepare" -delete
find . -name "astyle*.diff" -delete
find . -name "*.astyle" -delete
find . -name "sha*.diff" -delete


0 comments on commit 97c8e1a

Please sign in to comment.