Skip to content

Commit 1dc46d7

Browse files
committed
resolved all minor issues arised by last fix patch
1 parent 284f89d commit 1dc46d7

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

git/objects/submodule/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ def remove(self, module=True, force=False, configuration=True, dry_run=False):
846846
# have to manually delete references as python's scoping is
847847
# not existing, they could keep handles open ( on windows this is a problem )
848848
if len(rrefs):
849-
del(rref) # skipcq:PYL-W0631
849+
del(rref) # skipcq: PYL-W0631
850850
# END handle remotes
851851
del(rrefs)
852852
del(remote)

git/refs/log.py

+22-23
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def __repr__(self):
4646
def format(self):
4747
""":return: a string suitable to be placed in a reflog file"""
4848
act = self.actor
49-
time = self.time
49+
time_ = self.time_
5050
return u"{} {} {} <{}> {!s} {}\t{}\n".format(self.oldhexsha,
5151
self.newhexsha,
5252
act.name,
5353
act.email,
54-
time[0],
55-
altz_to_utctz_str(time[1]),
54+
time_[0],
55+
altz_to_utctz_str(time_[1]),
5656
self.message)
5757

5858
@property
@@ -71,7 +71,7 @@ def actor(self):
7171
return self[2]
7272

7373
@property
74-
def time(self):
74+
def time_(self):
7575
"""time as tuple:
7676
7777
* [0] = int(time)
@@ -84,12 +84,12 @@ def message(self):
8484
return self[4]
8585

8686
@classmethod
87-
def new(cls, oldhexsha, newhexsha, actor, time, tz_offset, message):
87+
def new(cls, oldhexsha, newhexsha, actor, time_, tz_offset, message):
8888
""":return: New instance of a RefLogEntry"""
8989
if not isinstance(actor, Actor):
9090
raise ValueError("Need actor instance, got %s" % actor)
9191
# END check types
92-
return RefLogEntry((oldhexsha, newhexsha, actor, (time, tz_offset), message))
92+
return RefLogEntry((oldhexsha, newhexsha, actor, (time_, tz_offset), message))
9393

9494
@classmethod
9595
def from_line(cls, line):
@@ -121,9 +121,9 @@ def from_line(cls, line):
121121
# END handle missing end brace
122122

123123
actor = Actor._from_string(info[82:email_end + 1])
124-
time, tz_offset = parse_date(info[email_end + 2:])
124+
time_, tz_offset = parse_date(info[email_end + 2:])
125125

126-
return RefLogEntry((oldhexsha, newhexsha, actor, (time, tz_offset), msg))
126+
return RefLogEntry((oldhexsha, newhexsha, actor, (time_, tz_offset), msg))
127127

128128

129129
class RefLog(list, Serializable):
@@ -220,21 +220,20 @@ def entry_at(cls, filepath, index):
220220
with open(filepath, 'rb') as fp:
221221
if index < 0:
222222
return RefLogEntry.from_line(fp.readlines()[index].strip())
223-
else:
224-
# read until index is reached
225-
for i in xrange(index + 1):
226-
line = fp.readline()
227-
if not line:
228-
break
229-
# END abort on eof
230-
# END handle runup
231-
232-
if i != index or not line: # skipcq:PYL-W0631
233-
raise IndexError
234-
# END handle exception
235-
236-
return RefLogEntry.from_line(line.strip())
237-
# END handle index
223+
# read until index is reached
224+
for i in xrange(index + 1):
225+
line = fp.readline()
226+
if not line:
227+
break
228+
# END abort on eof
229+
# END handle runup
230+
231+
if i != index or not line: # skipcq:PYL-W0631
232+
raise IndexError
233+
# END handle exception
234+
235+
return RefLogEntry.from_line(line.strip())
236+
# END handle index
238237

239238
def to_file(self, filepath):
240239
"""Write the contents of the reflog instance to a file at the given filepath.

0 commit comments

Comments
 (0)