| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,13 +46,13 @@ def __repr__(self): | |||
| 46 | 46 | def format(self): | |
| 47 | 47 | """:return: a string suitable to be placed in a reflog file""" | |
| 48 | 48 | act = self.actor | |
| 49 | - time_ = self.time_ | ||
| 49 | + time = self.time | ||
| 50 | 50 | return u"{} {} {} <{}> {!s} {}\t{}\n".format(self.oldhexsha, | |
| 51 | 51 | self.newhexsha, | |
| 52 | 52 | act.name, | |
| 53 | 53 | act.email, | |
| 54 | - time_[0], | ||
| 55 | - altz_to_utctz_str(time_[1]), | ||
| 54 | + time[0], | ||
| 55 | + altz_to_utctz_str(time[1]), | ||
| 56 | 56 | self.message) | |
| 57 | 57 | ||
| 58 | 58 | @property | |
@@ -71,7 +71,7 @@ def actor(self): | |||
| 71 | 71 | return self[2] | |
| 72 | 72 | ||
| 73 | 73 | @property | |
| 74 | - def time_(self): | ||
| 74 | + def time(self): | ||
| 75 | 75 | """time as tuple: | |
| 76 | 76 | ||
| 77 | 77 | * [0] = int(time) | |
@@ -83,14 +83,16 @@ def message(self): | |||
| 83 | 83 | """Message describing the operation that acted on the reference""" | |
| 84 | 84 | return self[4] | |
| 85 | 85 | ||
| 86 | + # skipcq: PYL-W0621 | ||
| 86 | 87 | @classmethod | |
| 87 | - def new(cls, oldhexsha, newhexsha, actor, time_, tz_offset, message): | ||
| 88 | + def new(cls, oldhexsha, newhexsha, actor, time, tz_offset, message): | ||
| 88 | 89 | """:return: New instance of a RefLogEntry""" | |
| 89 | 90 | if not isinstance(actor, Actor): | |
| 90 | 91 | raise ValueError("Need actor instance, got %s" % actor) | |
| 91 | 92 | # END check types | |
| 92 | - return RefLogEntry((oldhexsha, newhexsha, actor, (time_, tz_offset), message)) | ||
| 93 | + return RefLogEntry((oldhexsha, newhexsha, actor, (time, tz_offset), message)) | ||
| 93 | 94 | ||
| 95 | + # skipcq: PYL-W0621 | ||
| 94 | 96 | @classmethod | |
| 95 | 97 | def from_line(cls, line): | |
| 96 | 98 | """:return: New RefLogEntry instance from the given revlog line. | |
@@ -121,9 +123,9 @@ def from_line(cls, line): | |||
| 121 | 123 | # END handle missing end brace | |
| 122 | 124 | ||
| 123 | 125 | 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:]) | ||
| 125 | 127 | ||
| 126 | - return RefLogEntry((oldhexsha, newhexsha, actor, (time_, tz_offset), msg)) | ||
| 128 | + return RefLogEntry((oldhexsha, newhexsha, actor, (time, tz_offset), msg)) | ||
| 127 | 129 | ||
| 128 | 130 | ||
| 129 | 131 | class RefLog(list, Serializable): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments