diff --git a/doc/sources/contribute.rst b/doc/sources/contribute.rst index d38d8db6b..a7e1b0d58 100644 --- a/doc/sources/contribute.rst +++ b/doc/sources/contribute.rst @@ -88,9 +88,10 @@ but the fork you create with the following steps: the git remote name 'origin' and you will be on branch 'master'. #. Compile and set up PYTHONPATH or install (see :ref:`dev-install`). #. Install our pre-commit hook that ensures your code doesn't violate our - styleguide by executing 'make hook' in your clone. This will run our - styleguide check whenever you do a commit, and if there are violations in - the parts that you changed, your commit will be aborted. Fix & retry. + styleguide by executing `make hook` from the root directory of your + clone. This will run our styleguide check whenever you do a commit, + and if there are violations in the parts that you changed, your commit + will be aborted. Fix & retry. Now, whenever you want to create a patch, you follow the following steps: diff --git a/kivy/tools/pep8checker/pep8kivy.py b/kivy/tools/pep8checker/pep8kivy.py index b1e39c3e9..033bbef55 100644 --- a/kivy/tools/pep8checker/pep8kivy.py +++ b/kivy/tools/pep8checker/pep8kivy.py @@ -18,7 +18,7 @@ class KivyStyleChecker(pep8.Checker): line_number, offset, text, check) # html generation - print '%d%s' % (line_number, text) + print '{0}{1}'.format(line_number, text) if __name__ == '__main__': diff --git a/kivy/tools/pep8checker/pre-commit.githook b/kivy/tools/pep8checker/pre-commit.githook index 9a30c945e..c6eb1974e 100755 --- a/kivy/tools/pep8checker/pre-commit.githook +++ b/kivy/tools/pep8checker/pre-commit.githook @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 ''' Kivy Git Pre-Commit Hook to Enforce Styleguide @@ -32,7 +32,7 @@ proc = Popen(['git', 'diff', '--cached', '--name-only', 'HEAD'], stdout=PIPE) proc.wait() targets = [join(kivydir, target) for target in proc.stdout] call(['git', 'stash', 'save', '--keep-index', '--quiet']) -retval = call(['python', script, srcdir] + targets) +retval = call(['python2', script, srcdir] + targets) call(['git', 'stash', 'pop', '--quiet']) if retval: