Skip to content
Permalink
Browse files

scripts: run python scripts through autopep8

  • Loading branch information
jef-n committed Aug 22, 2015
1 parent 81d7ce7 commit 97c8e1ab57527ce775228be9dd75b7362e41dec6
Showing with 21 additions and 19 deletions.
  1. +14 −13 scripts/astyle.sh
  2. +7 −6 scripts/remove_temporary_files.sh
@@ -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
@@ -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)
@@ -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.
You can’t perform that action at this time.