summaryrefslogtreecommitdiff
path: root/git/refs
diff options
context:
space:
mode:
authorAnil Khatri <anil.soccer.khatri@gmail.com>2019-10-24 21:17:54 +0530
committerAnil Khatri <anil.soccer.khatri@gmail.com>2019-10-24 21:17:54 +0530
commit4dda3cbbd15e7a415c1cbd33f85d7d6d0e3a307a (patch)
tree08f5de86acf9c4ac75e3ae8c4abc3839e7613e38 /git/refs
parentd4756f4a1298e053aaeae58b725863e8742d353a (diff)
downloadgitpython-4dda3cbbd15e7a415c1cbd33f85d7d6d0e3a307a.tar.gz
silance Re-defined variable from outer scope
Diffstat (limited to 'git/refs')
-rw-r--r--git/refs/log.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/git/refs/log.py b/git/refs/log.py
index 74115145..243287ad 100644
--- a/git/refs/log.py
+++ b/git/refs/log.py
@@ -46,13 +46,13 @@ class RefLogEntry(tuple):
def format(self):
""":return: a string suitable to be placed in a reflog file"""
act = self.actor
- time_ = self.time_
+ time = self.time
return u"{} {} {} <{}> {!s} {}\t{}\n".format(self.oldhexsha,
self.newhexsha,
act.name,
act.email,
- time_[0],
- altz_to_utctz_str(time_[1]),
+ time[0],
+ altz_to_utctz_str(time[1]),
self.message)
@property
@@ -71,7 +71,7 @@ class RefLogEntry(tuple):
return self[2]
@property
- def time_(self):
+ def time(self):
"""time as tuple:
* [0] = int(time)
@@ -83,14 +83,16 @@ class RefLogEntry(tuple):
"""Message describing the operation that acted on the reference"""
return self[4]
+ # skipcq: PYL-W0621
@classmethod
- def new(cls, oldhexsha, newhexsha, actor, time_, tz_offset, message):
+ def new(cls, oldhexsha, newhexsha, actor, time, tz_offset, message):
""":return: New instance of a RefLogEntry"""
if not isinstance(actor, Actor):
raise ValueError("Need actor instance, got %s" % actor)
# END check types
- return RefLogEntry((oldhexsha, newhexsha, actor, (time_, tz_offset), message))
+ return RefLogEntry((oldhexsha, newhexsha, actor, (time, tz_offset), message))
+ # skipcq: PYL-W0621
@classmethod
def from_line(cls, line):
""":return: New RefLogEntry instance from the given revlog line.
@@ -121,9 +123,9 @@ class RefLogEntry(tuple):
# END handle missing end brace
actor = Actor._from_string(info[82:email_end + 1])
- time_, tz_offset = parse_date(info[email_end + 2:])
+ time, tz_offset = parse_date(info[email_end + 2:])
- return RefLogEntry((oldhexsha, newhexsha, actor, (time_, tz_offset), msg))
+ return RefLogEntry((oldhexsha, newhexsha, actor, (time, tz_offset), msg))
class RefLog(list, Serializable):