Skip to content

Commit 97c8e1a

Browse files
committedAug 22, 2015
scripts: run python scripts through autopep8
1 parent 81d7ce7 commit 97c8e1a

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed
 

‎scripts/astyle.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ if [ -z "$ASTYLE" ]; then
2929
fi
3030

3131
if ! type -p flip >/dev/null; then
32-
if type -p dos2unix >/dev/null; then
33-
flip() {
34-
dos2unix $2
35-
}
36-
else
37-
echo "flip not found" >&2
38-
flip() {
39-
:
40-
}
41-
fi
32+
if type -p dos2unix >/dev/null; then
33+
flip() {
34+
dos2unix $2
35+
}
36+
else
37+
echo "flip not found" >&2
38+
flip() {
39+
:
40+
}
41+
fi
4242
fi
4343

44-
if ! type -p pep8 >/dev/null; then
45-
pep8() {
44+
if ! type -p autopep8 >/dev/null; then
45+
autopep8() {
4646
:
4747
}
4848
fi
@@ -92,7 +92,8 @@ for f in "$@"; do
9292
;;
9393

9494
*.py)
95-
cmd="pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701"
95+
#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"
96+
cmd="autopep8 --in-place --ignore=E261,E402,E501"
9697
;;
9798

9899
*.sip)

‎scripts/remove_temporary_files.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616

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

2122
# Tim Sutton, May 2008
22-
find . -name "*.orig" -exec rm -rf {} \;
23-
find . -name "*.prepare" -exec rm -rf {} \;
24-
find . -name "astyle*.diff" -exec rm -rf {} \;
25-
find . -name "*.astyle" -exec rm -rf {} \;
26-
find . -name "sha*.diff" -exec rm -rf {} \;
23+
find . -name "*.orig" -delete
24+
find . -name "*.prepare" -delete
25+
find . -name "astyle*.diff" -delete
26+
find . -name "*.astyle" -delete
27+
find . -name "sha*.diff" -delete
2728

2829

0 commit comments

Comments
 (0)