From f5d11b750ecc982541d1f936488248f0b42d75d3 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 20:15:50 +0100 Subject: pep8 linting (whitespaces) W191 indentation contains tabs E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E271 multiple spaces after keyword W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file --- git/test/test_git.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git/test/test_git.py') diff --git a/git/test/test_git.py b/git/test/test_git.py index 7132aa83..c06b5e24 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -87,7 +87,7 @@ class TestGit(TestBase): size = int(obj_info.split()[2]) data = g.stdout.read(size) g.stdout.read(1) - + # now we should be able to read a new object g.stdin.write("b2339455342180c7cc1e9bba3e9f181f7baa5167\n") g.stdin.flush() @@ -95,7 +95,7 @@ class TestGit(TestBase): # same can be achived using the respective command functions - hexsha, typename, size = self.git.get_object_header(hexsha) + hexsha, typename, size = self.git.get_object_header(hexsha) hexsha, typename_two, size_two, data = self.git.get_object_data(hexsha) assert typename == typename_two and size == size_two @@ -123,7 +123,7 @@ class TestGit(TestBase): self.assertEquals(git_version, git_command_version) def test_single_char_git_options_are_passed_to_git(self): - input_value='TestValue' + input_value = 'TestValue' output_value = self.git(c='user.name={}'.format(input_value)).config('--get', 'user.name') self.assertEquals(input_value, output_value) -- cgit v1.2.1 From be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 20:51:04 +0100 Subject: pep8 linting (blank lines expectations) E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n) --- git/test/test_git.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'git/test/test_git.py') diff --git a/git/test/test_git.py b/git/test/test_git.py index c06b5e24..06410c45 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -15,6 +15,7 @@ from git.test.lib import ( TestBase, from git import ( Git, GitCommandError ) + class TestGit(TestBase): @classmethod @@ -41,7 +42,6 @@ class TestGit(TestBase): def test_it_raises_errors(self): self.git.this_does_not_exist() - def test_it_transforms_kwargs_into_git_command_arguments(self): assert_equal(["-s"], self.git.transform_kwargs(**{'s': True})) assert_equal(["-s5"], self.git.transform_kwargs(**{'s': 5})) @@ -93,7 +93,6 @@ class TestGit(TestBase): g.stdin.flush() assert g.stdout.readline() == obj_info - # same can be achived using the respective command functions hexsha, typename, size = self.git.get_object_header(hexsha) hexsha, typename_two, size_two, data = self.git.get_object_data(hexsha) -- cgit v1.2.1 From 614907b7445e2ed8584c1c37df7e466e3b56170f Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 20:56:53 +0100 Subject: pep8 linting (whitespace before/after) E201 whitespace after '(' E202 whitespace before ')' E203 whitespace before ':' E225 missing whitespace around operator E226 missing whitespace around arithmetic operator E227 missing whitespace around bitwise or shift operator E228 missing whitespace around modulo operator E231 missing whitespace after ',' E241 multiple spaces after ',' E251 unexpected spaces around keyword / parameter equals --- git/test/test_git.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'git/test/test_git.py') diff --git a/git/test/test_git.py b/git/test/test_git.py index 06410c45..e8a4c6b3 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -5,15 +5,15 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os -from git.test.lib import ( TestBase, +from git.test.lib import (TestBase, patch, raises, assert_equal, assert_true, assert_match, - fixture_path ) -from git import ( Git, - GitCommandError ) + fixture_path) +from git import (Git, + GitCommandError) class TestGit(TestBase): @@ -52,7 +52,7 @@ class TestGit(TestBase): assert_equal(["-s", "-t"], self.git.transform_kwargs(**{'s': True, 't': True})) def test_it_executes_git_to_shell_and_returns_result(self): - assert_match('^git version [\d\.]{2}.*$', self.git.execute(["git","version"])) + assert_match('^git version [\d\.]{2}.*$', self.git.execute(["git", "version"])) def test_it_accepts_stdin(self): filename = fixture_path("cat_file_blob") @@ -71,13 +71,13 @@ class TestGit(TestBase): # read header only import subprocess as sp hexsha = "b2339455342180c7cc1e9bba3e9f181f7baa5167" - g = self.git.cat_file(batch_check=True, istream=sp.PIPE,as_process=True) + g = self.git.cat_file(batch_check=True, istream=sp.PIPE, as_process=True) g.stdin.write("b2339455342180c7cc1e9bba3e9f181f7baa5167\n") g.stdin.flush() obj_info = g.stdout.readline() # read header + data - g = self.git.cat_file(batch=True, istream=sp.PIPE,as_process=True) + g = self.git.cat_file(batch=True, istream=sp.PIPE, as_process=True) g.stdin.write("b2339455342180c7cc1e9bba3e9f181f7baa5167\n") g.stdin.flush() obj_info_two = g.stdout.readline() -- cgit v1.2.1 From c8e70749887370a99adeda972cc3503397b5f9a7 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 21:09:47 +0100 Subject: pep8 linting (trailing whitespace) W291 trailing whitespace --- git/test/test_git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/test/test_git.py') diff --git a/git/test/test_git.py b/git/test/test_git.py index e8a4c6b3..49c256ca 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -6,7 +6,7 @@ import os from git.test.lib import (TestBase, - patch, + patch, raises, assert_equal, assert_true, -- cgit v1.2.1