From 874a1d6986a2ddfa19313862903b7e6fc3b8beb8 Mon Sep 17 00:00:00 2001 From: Edwin O Marshall Date: Thu, 15 Aug 2013 22:11:51 -0400 Subject: [PATCH] - made pre-commit hook python 3 compatable - fixed indentation of docstring in animation.py --- kivy/animation.py | 2 +- kivy/tools/pep8checker/pre-commit.githook | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kivy/animation.py b/kivy/animation.py index 83e1f5db6..5bdeeaf5e 100644 --- a/kivy/animation.py +++ b/kivy/animation.py @@ -418,7 +418,7 @@ class Sequence(Animation): self.dispatch('on_progress', widget, progress / 2.) def on_anim2_complete(self, instance, widget): - '''Repeating logic used with boolean variable "repeat". Added version 1.7.1''' + '''Repeating logic used with boolean variable "repeat". Added version 1.7.1''' if self.repeat == True: self.anim1.start(widget) else: diff --git a/kivy/tools/pep8checker/pre-commit.githook b/kivy/tools/pep8checker/pre-commit.githook index d7cf24b5c..23d119c01 100755 --- a/kivy/tools/pep8checker/pre-commit.githook +++ b/kivy/tools/pep8checker/pre-commit.githook @@ -56,7 +56,7 @@ targets = [] for target in proc.stdout: parts = [p.strip() for p in target.split()] if parts[0] != 'D': - targets.append(join(kivydir, target)) + targets.append(join(kivydir, target.decode(encoding='UTF-8'))) # Untested possibility: After making the changes above for removing deleted # files from targets, saw also where the git diff call could be: @@ -72,7 +72,7 @@ call(['git', 'stash', 'pop', '--quiet']) if retval: # There are styleguide violations - print "Error:", retval, "styleguide violation(s) encountered!" - print "Your commit has been aborted. Please fix the violations and retry." + print("Error:", retval, "styleguide violation(s) encountered!") + print("Your commit has been aborted. Please fix the violations and retry.") sys.exit(retval)