diff options
| author | Brian Wellington <bwelling@xbill.org> | 2020-06-03 15:56:58 -0700 |
|---|---|---|
| committer | Brian Wellington <bwelling@xbill.org> | 2020-06-03 15:56:58 -0700 |
| commit | cc55d17f5478751da21a7b325b2b46e8d94d8ffb (patch) | |
| tree | cfe1f182855d91fef11be31e4f4b77eeb214790d /dns/rrset.py | |
| parent | 8643c7d660fcc3bf620b085c2e483d1419408f96 (diff) | |
| download | dnspython-cc55d17f5478751da21a7b325b2b46e8d94d8ffb.tar.gz | |
Minor Python 3 cleanups.
Classes inherit from object by default; there's no need to explicitly
include this.
Replace super(Foo, self) with super().
Diffstat (limited to 'dns/rrset.py')
| -rw-r--r-- | dns/rrset.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dns/rrset.py b/dns/rrset.py index ac4289d..68136f4 100644 --- a/dns/rrset.py +++ b/dns/rrset.py @@ -41,12 +41,12 @@ class RRset(dns.rdataset.Rdataset): deleting=None): """Create a new RRset.""" - super(RRset, self).__init__(rdclass, rdtype, covers) + super().__init__(rdclass, rdtype, covers) self.name = name self.deleting = deleting def _clone(self): - obj = super(RRset, self)._clone() + obj = super()._clone() obj.name = self.name obj.deleting = self.deleting return obj @@ -73,14 +73,14 @@ class RRset(dns.rdataset.Rdataset): return False if self.name != other.name: return False - return super(RRset, self).__eq__(other) + return super().__eq__(other) def match(self, name, rdclass, rdtype, covers, deleting=None): """Returns ``True`` if this rrset matches the specified class, type, covers, and deletion state. """ - if not super(RRset, self).match(rdclass, rdtype, covers): + if not super().match(rdclass, rdtype, covers): return False if self.name != name or self.deleting != deleting: return False @@ -103,8 +103,8 @@ class RRset(dns.rdataset.Rdataset): to *origin*. """ - return super(RRset, self).to_text(self.name, origin, relativize, - self.deleting, **kw) + return super().to_text(self.name, origin, relativize, + self.deleting, **kw) def to_wire(self, file, compress=None, origin=None, **kw): """Convert the RRset to wire format. @@ -115,8 +115,8 @@ class RRset(dns.rdataset.Rdataset): Returns an ``int``, the number of records emitted. """ - return super(RRset, self).to_wire(self.name, file, compress, origin, - self.deleting, **kw) + return super().to_wire(self.name, file, compress, origin, + self.deleting, **kw) def to_rdataset(self): """Convert an RRset into an Rdataset. |
