Skip to content

Commit 6e07ebb

Browse files
committed
treewide: Remove unneeded inheritance from object
1 parent 85858ee commit 6e07ebb

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

varlink/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from .scanner import (Interface, _Method)
1515

1616

17-
class ClientInterfaceHandler(object):
17+
class ClientInterfaceHandler:
1818
"""Base class for varlink client, which wraps varlink methods of an interface to the class"""
1919

2020
def __init__(self, interface, namespaced=False):
@@ -281,7 +281,7 @@ def pipe_bridge(reader, writer):
281281
return
282282

283283

284-
class Client(object):
284+
class Client:
285285
"""Varlink client class.
286286
287287
>>> with varlink.Client("unix:/run/org.example.ping") as client, client.open('org.example.ping') as connection:

varlink/scanner.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from .error import (MethodNotFound, InvalidParameter)
1111

1212

13-
class Scanner(object):
13+
class Scanner:
1414
"""Class for scanning a varlink interface definition."""
1515

1616
def __init__(self, string):
@@ -195,55 +195,55 @@ def read_member(self):
195195
raise SyntaxError('expected type, method, or error')
196196

197197

198-
class _Object(object):
198+
class _Object:
199199
pass
200200

201201

202-
class _Struct(object):
202+
class _Struct:
203203

204204
def __init__(self, fields):
205205
self.fields = OrderedDict(fields)
206206

207207

208-
class _Enum(object):
208+
class _Enum:
209209

210210
def __init__(self, fields):
211211
self.fields = fields
212212

213213

214-
class _Array(object):
214+
class _Array:
215215

216216
def __init__(self, element_type):
217217
self.element_type = element_type
218218

219219

220-
class _Maybe(object):
220+
class _Maybe:
221221

222222
def __init__(self, element_type):
223223
self.element_type = element_type
224224

225225

226-
class _Dict(object):
226+
class _Dict:
227227

228228
def __init__(self, element_type):
229229
self.element_type = element_type
230230

231231

232-
class _CustomType(object):
232+
class _CustomType:
233233

234234
def __init__(self, name):
235235
self.name = name
236236

237237

238-
class _Alias(object):
238+
class _Alias:
239239

240240
def __init__(self, name, varlink_type, doc=None):
241241
self.name = name
242242
self.type = varlink_type
243243
self.doc = doc
244244

245245

246-
class _Method(object):
246+
class _Method:
247247

248248
def __init__(self, name, in_type, out_type, _signature, doc=None):
249249
self.name = name
@@ -253,15 +253,15 @@ def __init__(self, name, in_type, out_type, _signature, doc=None):
253253
self.doc = doc
254254

255255

256-
class _Error(object):
256+
class _Error:
257257

258258
def __init__(self, name, varlink_type, doc=None):
259259
self.name = name
260260
self.type = varlink_type
261261
self.doc = doc
262262

263263

264-
class Interface(object):
264+
class Interface:
265265
"""Class for a parsed varlink interface definition."""
266266

267267
def __init__(self, description):

varlink/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from types import GeneratorType
2020

2121

22-
class Service(object):
22+
class Service:
2323
"""Varlink service server handler
2424
2525
To use the Service, a global object is instantiated:

varlink/tests/test_certification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, wants, got):
8383

8484

8585
@service.interface('org.varlink.certification')
86-
class CertService(object):
86+
class CertService:
8787
next_method = {}
8888

8989
def new_client_id(self, _server):

varlink/tests/test_orgexamplemore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __init__(self, reason):
8888

8989

9090
@service.interface('org.example.more')
91-
class Example(object):
91+
class Example:
9292
sleep_duration = 1
9393

9494
def TestMore(self, n, _more=True, _server=None):

0 commit comments

Comments
 (0)