diff options
author | Antoine Musso <hashar@free.fr> | 2014-11-16 21:06:57 +0100 |
---|---|---|
committer | Antoine Musso <hashar@free.fr> | 2014-11-16 21:06:57 +0100 |
commit | bed3b0989730cdc3f513884325f1447eb378aaee (patch) | |
tree | dced9fc6823d9a7b99e8b8b47e31d25e49ed7d26 | |
parent | 614907b7445e2ed8584c1c37df7e466e3b56170f (diff) | |
download | gitpython-bed3b0989730cdc3f513884325f1447eb378aaee.tar.gz |
pep8 linting (double spaces before comment)
E261 at least two spaces before inline comment
-rw-r--r-- | git/cmd.py | 4 | ||||
-rw-r--r-- | git/index/base.py | 2 | ||||
-rw-r--r-- | git/objects/tag.py | 4 | ||||
-rw-r--r-- | git/odict.py | 4 | ||||
-rw-r--r-- | git/refs/symbolic.py | 4 | ||||
-rw-r--r-- | git/repo/fun.py | 2 | ||||
-rw-r--r-- | git/test/test_commit.py | 4 | ||||
-rw-r--r-- | git/test/test_refs.py | 6 | ||||
-rw-r--r-- | git/test/test_submodule.py | 6 |
9 files changed, 18 insertions, 18 deletions
@@ -92,7 +92,7 @@ class Git(LazyMixin): os.kill(self.proc.pid, 2) # interrupt signal self.proc.wait() # ensure process goes away except OSError: - pass # ignore error when process already died + pass # ignore error when process already died except AttributeError: # try windows # for some reason, providing None for stdout/stderr still prints something. This is why @@ -348,7 +348,7 @@ class Git(LazyMixin): stdin=istream, stderr=PIPE, stdout=PIPE, - close_fds=(os.name == 'posix'),# unsupported on linux + close_fds=(os.name == 'posix'), # unsupported on linux **subprocess_kwargs ) if as_process: diff --git a/git/index/base.py b/git/index/base.py index 197056b3..870b2393 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -94,7 +94,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): before operating on it using the git command""" __slots__ = ("repo", "version", "entries", "_extension_data", "_file_path") _VERSION = 2 # latest version we support - S_IFGITLINK = S_IFGITLINK # a submodule + S_IFGITLINK = S_IFGITLINK # a submodule def __init__(self, repo, file_path=None): """Initialize this Index instance, optionally from the given ``file_path``. diff --git a/git/objects/tag.py b/git/objects/tag.py index 7ba8ce29..345bb1d5 100644 --- a/git/objects/tag.py +++ b/git/objects/tag.py @@ -55,12 +55,12 @@ class TagObject(base.Object): lines = ostream.read().splitlines() obj, hexsha = lines[0].split(" ") # object <hexsha> - type_token, type_name = lines[1].split(" ") # type <type_name> + type_token, type_name = lines[1].split(" ") # type <type_name> self.object = get_object_type_by_name(type_name)(self.repo, hex_to_bin(hexsha)) self.tag = lines[2][4:] # tag <tag name> - tagger_info = lines[3]# tagger <actor> <date> + tagger_info = lines[3] # tagger <actor> <date> self.tagger, self.tagged_date, self.tagger_tz_offset = parse_actor_and_date(tagger_info) # line 4 empty - it could mark the beginning of the next header diff --git a/git/odict.py b/git/odict.py index 55bb1c43..96444ca0 100644 --- a/git/odict.py +++ b/git/odict.py @@ -1063,7 +1063,7 @@ class Items(object): def __contains__(self, item): return item in self._main.items() - def __len__(self): return len(self._main._sequence) # easier :-) + def __len__(self): return len(self._main._sequence) # easier :-) def __iter__(self): return self._main.iteritems() @@ -1184,7 +1184,7 @@ class Values(object): def __contains__(self, item): return item in self._main.values() - def __len__(self): return len(self._main._sequence) # easier :-) + def __len__(self): return len(self._main._sequence) # easier :-) def __iter__(self): return self._main.itervalues() diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 1115ac9c..4082e74a 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -403,7 +403,7 @@ class SymbolicReference(object): try: reader = open(pack_file_path, 'rb') except (OSError, IOError): - pass # it didnt exist at all + pass # it didnt exist at all else: new_lines = list() made_change = False @@ -553,7 +553,7 @@ class SymbolicReference(object): # walk loose refs # Currently we do not follow links for root, dirs, files in os.walk(join_path_native(repo.git_dir, common_path)): - if 'refs/' not in root: # skip non-refs subfolders + if 'refs/' not in root: # skip non-refs subfolders refs_id = [d for d in dirs if d == 'refs'] if refs_id: dirs[0:] = ['refs'] diff --git a/git/repo/fun.py b/git/repo/fun.py index 4cdaf3f4..1e131b0f 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -186,7 +186,7 @@ def rev_parse(repo, rev): # handle type if output_type == 'commit': - pass # default + pass # default elif output_type == 'tree': try: obj = to_commit(obj).tree diff --git a/git/test/test_commit.py b/git/test/test_commit.py index 7bb019f4..e211f75b 100644 --- a/git/test/test_commit.py +++ b/git/test/test_commit.py @@ -73,7 +73,7 @@ class TestCommit(TestBase): commit = self.rorepo.commit('2454ae89983a4496a445ce347d7a41c0bb0ea7ae') # commits have no dict self.failUnlessRaises(AttributeError, setattr, commit, 'someattr', 1) - commit.author # bake + commit.author # bake assert_equal("Sebastian Thiel", commit.author.name) assert_equal("byronimo@gmail.com", commit.author.email) @@ -251,7 +251,7 @@ class TestCommit(TestBase): # Verify its serialization and deserialization cmt = self.rorepo.commit('0.1.6') assert isinstance(cmt.message, unicode) # it automatically decodes it as such - assert isinstance(cmt.author.name, unicode) # same here + assert isinstance(cmt.author.name, unicode) # same here cmt.message = "üäêèß".decode("utf-8") assert len(cmt.message) == 5 diff --git a/git/test/test_refs.py b/git/test/test_refs.py index 5658181d..f4f8b9d8 100644 --- a/git/test/test_refs.py +++ b/git/test/test_refs.py @@ -168,7 +168,7 @@ class TestRefs(TestBase): cur_head = rw_repo.head old_head_commit = cur_head.commit new_head_commit = cur_head.ref.commit.parents[0] - cur_head.reset(new_head_commit, index=True) # index only + cur_head.reset(new_head_commit, index=True) # index only assert cur_head.reference.commit == new_head_commit self.failUnlessRaises(ValueError, cur_head.reset, new_head_commit, index=False, working_tree=True) @@ -185,7 +185,7 @@ class TestRefs(TestBase): # we can do a mixed reset, and then checkout from the index though cur_head.reset(new_head_commit) - rw_repo.index.checkout(["lib"], force=True)# + rw_repo.index.checkout(["lib"], force=True) # now that we have a write write repo, change the HEAD reference - its # like git-reset --soft @@ -413,7 +413,7 @@ class TestRefs(TestBase): far_away_head.commit = ref.commit ref.rename(ex_ref_path) assert ref.path == ex_ref_path and ref.object == orig_obj - assert ref.rename(ref.path).path == ex_ref_path # rename to same name + assert ref.rename(ref.path).path == ex_ref_path # rename to same name # create symbolic refs symref_path = "symrefs/sym" diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py index b657b25e..3f7ac39d 100644 --- a/git/test/test_submodule.py +++ b/git/test/test_submodule.py @@ -338,7 +338,7 @@ class TestSubmodule(TestBase): assert nsm.move(sm.path) is nsm # rename a module - nmp = join_path_native("new", "module", "dir") + "/" # new module path + nmp = join_path_native("new", "module", "dir") + "/" # new module path pmp = nsm.path abspmp = nsm.abspath assert nsm.move(nmp) is nsm @@ -447,7 +447,7 @@ class TestSubmodule(TestBase): sm.move(fp, module=False) # leave it at the old location assert not sm.module_exists() - cpathchange = rwrepo.index.commit("changed sm path") # finally we can commit + cpathchange = rwrepo.index.commit("changed sm path") # finally we can commit # update puts the module into place rm.update(recursive=False, progress=prog) @@ -549,7 +549,7 @@ class TestSubmodule(TestBase): # ================= # finally we recursively update a module, just to run the code at least once # remove the module so that it has more work - assert len(nsm.children()) >= 1 # could include smmap + assert len(nsm.children()) >= 1 # could include smmap assert nsm.exists() and nsm.module_exists() and len(nsm.children()) >= 1 # assure we pull locally only nsmc = nsm.children()[0] |