diff options
| author | Ramin Farajpour Cami <ramin.blackhat@gmail.com> | 2016-11-15 02:10:28 +0330 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-14 17:40:28 -0500 |
| commit | 0a63ef3f61f42c5fd22f2d0b626e386fd426ebed (patch) | |
| tree | 4529b5f5c23db4062a5195f961e4ae468120741e /django/utils | |
| parent | c7bfcd2f377ad5803e25ee547dee9cf58ee68ab2 (diff) | |
Fixed #27463 -- Fixed E741 flake8 warnings.
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/crypto.py | 8 | ||||
| -rw-r--r-- | django/utils/dateformat.py | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/django/utils/crypto.py b/django/utils/crypto.py index b364762275..3804dd9111 100644 --- a/django/utils/crypto.py +++ b/django/utils/crypto.py @@ -164,8 +164,8 @@ else: dklen = hlen if dklen > (2 ** 32 - 1) * hlen: raise OverflowError('dklen too big') - l = -(-dklen // hlen) - r = dklen - (l - 1) * hlen + L = -(-dklen // hlen) + r = dklen - (L - 1) * hlen hex_format_string = "%%0%ix" % (hlen * 2) @@ -187,5 +187,5 @@ else: result ^= _bin_to_long(u) return _long_to_bin(result, hex_format_string) - T = [F(x) for x in range(1, l)] - return b''.join(T) + F(l)[:r] + T = [F(x) for x in range(1, L)] + return b''.join(T) + F(L)[:r] diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py index 5e39648343..70650bf625 100644 --- a/django/utils/dateformat.py +++ b/django/utils/dateformat.py @@ -130,7 +130,7 @@ class TimeFormat(Formatter): "Minutes; i.e. '00' to '59'" return '%02d' % self.data.minute - def O(self): + def O(self): # NOQA: E743 """ Difference to Greenwich time in hours; e.g. '+0200', '-0430'. @@ -247,7 +247,7 @@ class DateFormat(TimeFormat): "Month, textual, long; e.g. 'January'" return MONTHS[self.data.month] - def I(self): + def I(self): # NOQA: E743 "'1' if Daylight Savings Time, '0' otherwise." try: if self.timezone and self.timezone.dst(self.data): @@ -264,7 +264,7 @@ class DateFormat(TimeFormat): "Day of the month without leading zeros; i.e. '1' to '31'" return self.data.day - def l(self): + def l(self): # NOQA: E743 "Day of the week, textual, long; e.g. 'Friday'" return WEEKDAYS[self.data.weekday()] |
