Skip to content

Commit bed3b09

Browse files
committed
pep8 linting (double spaces before comment)
E261 at least two spaces before inline comment
1 parent 614907b commit bed3b09

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

‎git/cmd.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def __del__(self):
9292
os.kill(self.proc.pid, 2) # interrupt signal
9393
self.proc.wait() # ensure process goes away
9494
exceptOSError:
95-
pass# ignore error when process already died
95+
pass# ignore error when process already died
9696
exceptAttributeError:
9797
# try windows
9898
# for some reason, providing None for stdout/stderr still prints something. This is why
@@ -348,7 +348,7 @@ def execute(self, command,
348348
stdin=istream,
349349
stderr=PIPE,
350350
stdout=PIPE,
351-
close_fds=(os.name=='posix'),# unsupported on linux
351+
close_fds=(os.name=='posix'),# unsupported on linux
352352
**subprocess_kwargs
353353
)
354354
ifas_process:

‎git/index/base.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
9494
before operating on it using the git command"""
9595
__slots__= ("repo", "version", "entries", "_extension_data", "_file_path")
9696
_VERSION=2# latest version we support
97-
S_IFGITLINK=S_IFGITLINK# a submodule
97+
S_IFGITLINK=S_IFGITLINK# a submodule
9898

9999
def__init__(self, repo, file_path=None):
100100
"""Initialize this Index instance, optionally from the given ``file_path``.

‎git/objects/tag.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ def _set_cache_(self, attr):
5555
lines=ostream.read().splitlines()
5656

5757
obj, hexsha=lines[0].split(" ") # object <hexsha>
58-
type_token, type_name=lines[1].split(" ") # type <type_name>
58+
type_token, type_name=lines[1].split(" ") # type <type_name>
5959
self.object=get_object_type_by_name(type_name)(self.repo, hex_to_bin(hexsha))
6060

6161
self.tag=lines[2][4:] # tag <tag name>
6262

63-
tagger_info=lines[3]# tagger <actor> <date>
63+
tagger_info=lines[3]# tagger <actor> <date>
6464
self.tagger, self.tagged_date, self.tagger_tz_offset=parse_actor_and_date(tagger_info)
6565

6666
# line 4 empty - it could mark the beginning of the next header

‎git/odict.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ def __cmp__(self, other): return cmp(self._main.items(), other)
10631063

10641064
def__contains__(self, item): returniteminself._main.items()
10651065

1066-
def__len__(self): returnlen(self._main._sequence) # easier :-)
1066+
def__len__(self): returnlen(self._main._sequence) # easier :-)
10671067

10681068
def__iter__(self): returnself._main.iteritems()
10691069

@@ -1184,7 +1184,7 @@ def __cmp__(self, other): return cmp(self._main.values(), other)
11841184

11851185
def__contains__(self, item): returniteminself._main.values()
11861186

1187-
def__len__(self): returnlen(self._main._sequence) # easier :-)
1187+
def__len__(self): returnlen(self._main._sequence) # easier :-)
11881188

11891189
def__iter__(self): returnself._main.itervalues()
11901190

‎git/refs/symbolic.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def delete(cls, repo, path):
403403
try:
404404
reader=open(pack_file_path, 'rb')
405405
except (OSError, IOError):
406-
pass# it didnt exist at all
406+
pass# it didnt exist at all
407407
else:
408408
new_lines=list()
409409
made_change=False
@@ -553,7 +553,7 @@ def _iter_items(cls, repo, common_path=None):
553553
# walk loose refs
554554
# Currently we do not follow links
555555
forroot, dirs, filesinos.walk(join_path_native(repo.git_dir, common_path)):
556-
if'refs/'notinroot: # skip non-refs subfolders
556+
if'refs/'notinroot: # skip non-refs subfolders
557557
refs_id= [dfordindirsifd=='refs']
558558
ifrefs_id:
559559
dirs[0:] = ['refs']

‎git/repo/fun.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def rev_parse(repo, rev):
186186

187187
# handle type
188188
ifoutput_type=='commit':
189-
pass# default
189+
pass# default
190190
elifoutput_type=='tree':
191191
try:
192192
obj=to_commit(obj).tree

‎git/test/test_commit.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_bake(self):
7373
commit=self.rorepo.commit('2454ae89983a4496a445ce347d7a41c0bb0ea7ae')
7474
# commits have no dict
7575
self.failUnlessRaises(AttributeError, setattr, commit, 'someattr', 1)
76-
commit.author# bake
76+
commit.author# bake
7777

7878
assert_equal("Sebastian Thiel", commit.author.name)
7979
assert_equal("[email protected]", commit.author.email)
@@ -251,7 +251,7 @@ def test_serialization_unicode_support(self):
251251
# Verify its serialization and deserialization
252252
cmt=self.rorepo.commit('0.1.6')
253253
assertisinstance(cmt.message, unicode) # it automatically decodes it as such
254-
assertisinstance(cmt.author.name, unicode) # same here
254+
assertisinstance(cmt.author.name, unicode) # same here
255255

256256
cmt.message="üäêèß".decode("utf-8")
257257
assertlen(cmt.message) ==5

‎git/test/test_refs.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def test_head_reset(self, rw_repo):
168168
cur_head=rw_repo.head
169169
old_head_commit=cur_head.commit
170170
new_head_commit=cur_head.ref.commit.parents[0]
171-
cur_head.reset(new_head_commit, index=True) # index only
171+
cur_head.reset(new_head_commit, index=True) # index only
172172
assertcur_head.reference.commit==new_head_commit
173173

174174
self.failUnlessRaises(ValueError, cur_head.reset, new_head_commit, index=False, working_tree=True)
@@ -185,7 +185,7 @@ def test_head_reset(self, rw_repo):
185185

186186
# we can do a mixed reset, and then checkout from the index though
187187
cur_head.reset(new_head_commit)
188-
rw_repo.index.checkout(["lib"], force=True)#
188+
rw_repo.index.checkout(["lib"], force=True)
189189

190190
# now that we have a write write repo, change the HEAD reference - its
191191
# like git-reset --soft
@@ -413,7 +413,7 @@ def test_head_reset(self, rw_repo):
413413
far_away_head.commit=ref.commit
414414
ref.rename(ex_ref_path)
415415
assertref.path==ex_ref_pathandref.object==orig_obj
416-
assertref.rename(ref.path).path==ex_ref_path# rename to same name
416+
assertref.rename(ref.path).path==ex_ref_path# rename to same name
417417

418418
# create symbolic refs
419419
symref_path="symrefs/sym"

‎git/test/test_submodule.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def _do_base_tests(self, rwrepo):
338338
assertnsm.move(sm.path) isnsm
339339

340340
# rename a module
341-
nmp=join_path_native("new", "module", "dir") +"/"# new module path
341+
nmp=join_path_native("new", "module", "dir") +"/"# new module path
342342
pmp=nsm.path
343343
abspmp=nsm.abspath
344344
assertnsm.move(nmp) isnsm
@@ -447,7 +447,7 @@ def test_root_module(self, rwrepo):
447447
sm.move(fp, module=False) # leave it at the old location
448448

449449
assertnotsm.module_exists()
450-
cpathchange=rwrepo.index.commit("changed sm path") # finally we can commit
450+
cpathchange=rwrepo.index.commit("changed sm path") # finally we can commit
451451

452452
# update puts the module into place
453453
rm.update(recursive=False, progress=prog)
@@ -549,7 +549,7 @@ def test_root_module(self, rwrepo):
549549
# =================
550550
# finally we recursively update a module, just to run the code at least once
551551
# remove the module so that it has more work
552-
assertlen(nsm.children()) >=1# could include smmap
552+
assertlen(nsm.children()) >=1# could include smmap
553553
assertnsm.exists() andnsm.module_exists() andlen(nsm.children()) >=1
554554
# assure we pull locally only
555555
nsmc=nsm.children()[0]

0 commit comments

Comments
(0)