Don't inheric from 'object' (after deprecating Python 2.x support)
This commit is contained in:
@@ -59,7 +59,7 @@ class DeviceError(Error):
|
||||
"""Error during device operation."""
|
||||
|
||||
|
||||
class Identity(object):
|
||||
class Identity:
|
||||
"""Represent SLIP-0013 identity, together with a elliptic curve choice."""
|
||||
|
||||
def __init__(self, identity_str, curve_name):
|
||||
@@ -102,7 +102,7 @@ class Identity(object):
|
||||
return self.curve_name
|
||||
|
||||
|
||||
class Device(object):
|
||||
class Device:
|
||||
"""Abstract cryptographic hardware device interface."""
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -9,7 +9,7 @@ from .. import util
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class UI(object):
|
||||
class UI:
|
||||
"""UI for PIN/passphrase entry (for TREZOR devices)."""
|
||||
|
||||
def __init__(self, device_type, config=None):
|
||||
|
||||
@@ -70,7 +70,7 @@ class AgentStop(Exception):
|
||||
|
||||
|
||||
# pylint: disable=too-many-instance-attributes
|
||||
class Handler(object):
|
||||
class Handler:
|
||||
"""GPG agent requests' handler."""
|
||||
|
||||
def _get_options(self):
|
||||
|
||||
@@ -15,7 +15,7 @@ def create_identity(user_id, curve_name):
|
||||
return result
|
||||
|
||||
|
||||
class Client(object):
|
||||
class Client:
|
||||
"""Sign messages and get public keys from a hardware device."""
|
||||
|
||||
def __init__(self, device):
|
||||
|
||||
@@ -185,7 +185,7 @@ def get_curve_name_by_oid(oid):
|
||||
raise KeyError('Unknown OID: {!r}'.format(oid))
|
||||
|
||||
|
||||
class PublicKey(object):
|
||||
class PublicKey:
|
||||
"""GPG representation for public key packets."""
|
||||
|
||||
def __init__(self, curve_name, created, verifying_key, ecdh=False):
|
||||
|
||||
@@ -41,7 +41,7 @@ def test_parse_rsa():
|
||||
assert keyring.parse_sig(sig) == (0x1020304,)
|
||||
|
||||
|
||||
class FakeSocket(object):
|
||||
class FakeSocket:
|
||||
def __init__(self):
|
||||
self.rx = io.BytesIO()
|
||||
self.tx = io.BytesIO()
|
||||
|
||||
@@ -39,7 +39,7 @@ def unix_domain_socket_server(sock_path):
|
||||
remove_file(sock_path)
|
||||
|
||||
|
||||
class FDServer(object):
|
||||
class FDServer:
|
||||
"""File-descriptor based server (for NeoPG)."""
|
||||
|
||||
def __init__(self, fd):
|
||||
|
||||
@@ -193,7 +193,7 @@ def import_public_keys(contents):
|
||||
yield line
|
||||
|
||||
|
||||
class JustInTimeConnection(object):
|
||||
class JustInTimeConnection:
|
||||
"""Connect to the device just before the needed operation."""
|
||||
|
||||
def __init__(self, conn_factory, identities, public_keys=None):
|
||||
|
||||
@@ -11,7 +11,7 @@ from . import formats, util
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Client(object):
|
||||
class Client:
|
||||
"""Client wrapper for SSH authentication device."""
|
||||
|
||||
def __init__(self, device):
|
||||
|
||||
@@ -70,7 +70,7 @@ def _legacy_pubs(buf):
|
||||
return util.frame(code, num)
|
||||
|
||||
|
||||
class Handler(object):
|
||||
class Handler:
|
||||
"""ssh-agent protocol handler."""
|
||||
|
||||
def __init__(self, conn, debug=False):
|
||||
|
||||
@@ -18,7 +18,7 @@ def test_socket():
|
||||
assert not os.path.isfile(path)
|
||||
|
||||
|
||||
class FakeSocket(object):
|
||||
class FakeSocket:
|
||||
|
||||
def __init__(self, data=b''):
|
||||
self.rx = io.BytesIO(data)
|
||||
@@ -77,7 +77,7 @@ def test_server_thread():
|
||||
connections = [sock]
|
||||
quit_event = threading.Event()
|
||||
|
||||
class FakeServer(object):
|
||||
class FakeServer:
|
||||
def accept(self): # pylint: disable=no-self-use
|
||||
if not connections:
|
||||
raise socket.timeout()
|
||||
|
||||
@@ -25,7 +25,7 @@ def test_frames():
|
||||
assert util.read_frame(io.BytesIO(f)) == b''.join(msgs)
|
||||
|
||||
|
||||
class FakeSocket(object):
|
||||
class FakeSocket:
|
||||
def __init__(self):
|
||||
self.buf = io.BytesIO()
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ def hexlify(blob):
|
||||
return binascii.hexlify(blob).decode('ascii').upper()
|
||||
|
||||
|
||||
class Reader(object):
|
||||
class Reader:
|
||||
"""Read basic type objects out of given stream."""
|
||||
|
||||
def __init__(self, stream):
|
||||
@@ -258,7 +258,7 @@ def assuan_serialize(data):
|
||||
return data
|
||||
|
||||
|
||||
class ExpiringCache(object):
|
||||
class ExpiringCache:
|
||||
"""Simple cache with a deadline."""
|
||||
|
||||
def __init__(self, seconds, timer=time.time):
|
||||
|
||||
Reference in New Issue
Block a user