mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Remove Python 2 handling code (#2098)
* Remove Python 2 update modal * Remove Python 2 handling code * Remove backports dependencies * Remove uses of future and __future__ * Fix import * Remove requirements * Update lib folder * Clean up imports and blank lines --------- Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
This commit is contained in:
parent
dcec1f6f5f
commit
de3393d62b
97 changed files with 7443 additions and 2917 deletions
|
@ -223,9 +223,11 @@ class newint(with_metaclass(BaseNewInt, long)):
|
|||
|
||||
def __rpow__(self, other):
|
||||
value = super(newint, self).__rpow__(other)
|
||||
if value is NotImplemented:
|
||||
if isint(value):
|
||||
return newint(value)
|
||||
elif value is NotImplemented:
|
||||
return other ** long(self)
|
||||
return newint(value)
|
||||
return value
|
||||
|
||||
def __lshift__(self, other):
|
||||
if not isint(other):
|
||||
|
@ -318,7 +320,7 @@ class newint(with_metaclass(BaseNewInt, long)):
|
|||
bits = length * 8
|
||||
num = (2**bits) + self
|
||||
if num <= 0:
|
||||
raise OverflowError("int too smal to convert")
|
||||
raise OverflowError("int too small to convert")
|
||||
else:
|
||||
if self < 0:
|
||||
raise OverflowError("can't convert negative int to unsigned")
|
||||
|
|
|
@ -105,7 +105,7 @@ class newrange(Sequence):
|
|||
raise ValueError('%r is not in range' % value)
|
||||
|
||||
def count(self, value):
|
||||
"""Return the number of ocurrences of integer `value`
|
||||
"""Return the number of occurrences of integer `value`
|
||||
in the sequence this range represents."""
|
||||
# a value can occur exactly zero or one times
|
||||
return int(value in self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue