Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4dda3cb

Browse files
committed
silance Re-defined variable from outer scope
1 parentd4756f4 commit4dda3cb

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

‎git/refs/log.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def __repr__(self):
4646
defformat(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
returnu"{} {} {} <{}> {!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
returnself[2]
7272

7373
@property
74-
deftime_(self):
74+
deftime(self):
7575
"""time as tuple:
7676
7777
* [0] = int(time)
@@ -83,14 +83,16 @@ def message(self):
8383
"""Message describing the operation that acted on the reference"""
8484
returnself[4]
8585

86+
# skipcq: PYL-W0621
8687
@classmethod
87-
defnew(cls,oldhexsha,newhexsha,actor,time_,tz_offset,message):
88+
defnew(cls,oldhexsha,newhexsha,actor,time,tz_offset,message):
8889
""":return: New instance of a RefLogEntry"""
8990
ifnotisinstance(actor,Actor):
9091
raiseValueError("Need actor instance, got %s"%actor)
9192
# END check types
92-
returnRefLogEntry((oldhexsha,newhexsha,actor, (time_,tz_offset),message))
93+
returnRefLogEntry((oldhexsha,newhexsha,actor, (time,tz_offset),message))
9394

95+
# skipcq: PYL-W0621
9496
@classmethod
9597
deffrom_line(cls,line):
9698
""":return: New RefLogEntry instance from the given revlog line.
@@ -121,9 +123,9 @@ def from_line(cls, line):
121123
# END handle missing end brace
122124

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

126-
returnRefLogEntry((oldhexsha,newhexsha,actor, (time_,tz_offset),msg))
128+
returnRefLogEntry((oldhexsha,newhexsha,actor, (time,tz_offset),msg))
127129

128130

129131
classRefLog(list,Serializable):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp