From: Petr Spacek Date: Fri, 16 Jan 2015 12:10:46 +0000 (+0100) Subject: Remove redundant 'pass' from class definitions. X-Git-Tag: v1.13.0~35^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0244fc2a4c149c0731841697693c31b3dd1beb58;p=thirdparty%2Fdnspython.git Remove redundant 'pass' from class definitions. --- diff --git a/dns/dnssec.py b/dns/dnssec.py index 20925254..a4546450 100644 --- a/dns/dnssec.py +++ b/dns/dnssec.py @@ -30,11 +30,9 @@ import dns.rdataclass class UnsupportedAlgorithm(dns.exception.DNSException): """The DNSSEC algorithm is not supported.""" - pass class ValidationFailure(dns.exception.DNSException): """The DNSSEC signature is invalid.""" - pass RSAMD5 = 1 DH = 2 diff --git a/dns/exception.py b/dns/exception.py index e07b099d..60b49129 100644 --- a/dns/exception.py +++ b/dns/exception.py @@ -26,20 +26,15 @@ class DNSException(Exception): class FormError(DNSException): """DNS message is malformed.""" - pass class SyntaxError(DNSException): """Text input is malformed.""" - pass class UnexpectedEnd(SyntaxError): """Text input ended unexpectedly.""" - pass class TooBig(DNSException): """The DNS message is too big.""" - pass class Timeout(DNSException): """The DNS operation timed out.""" - pass diff --git a/dns/message.py b/dns/message.py index ba714bda..820376d7 100644 --- a/dns/message.py +++ b/dns/message.py @@ -38,30 +38,24 @@ import dns.wiredata class ShortHeader(dns.exception.FormError): """The DNS packet passed to from_wire() is too short.""" - pass class TrailingJunk(dns.exception.FormError): """The DNS packet passed to from_wire() has extra junk at the end of it.""" - pass class UnknownHeaderField(dns.exception.DNSException): """The header field name was not recognized when converting from text into a message.""" - pass class BadEDNS(dns.exception.FormError): """OPT record occured somewhere other than the start of the additional data section.""" - pass class BadTSIG(dns.exception.FormError): """A TSIG record occured somewhere other than the end of the additional data section.""" - pass class UnknownTSIGKey(dns.exception.DNSException): """A TSIG with an unknown key was received.""" - pass class Message(object): """A DNS message. diff --git a/dns/name.py b/dns/name.py index f70a9a53..55c3fde0 100644 --- a/dns/name.py +++ b/dns/name.py @@ -40,42 +40,33 @@ NAMERELN_COMMONANCESTOR = 4 class EmptyLabel(dns.exception.SyntaxError): """A DNS label is empty.""" - pass class BadEscape(dns.exception.SyntaxError): """An escaped code in a text format of DNS name is invalid.""" - pass class BadPointer(dns.exception.FormError): """A DNS compression pointer points forward instead of backward.""" - pass class BadLabelType(dns.exception.FormError): """The label type in DNS name wire format is unknown.""" - pass class NeedAbsoluteNameOrOrigin(dns.exception.DNSException): """An attempt was made to convert a non-absolute name to wire when there was also a non-absolute (or missing) origin.""" - pass class NameTooLong(dns.exception.FormError): """A DNS name is > 255 octets long.""" - pass class LabelTooLong(dns.exception.SyntaxError): """A DNS label is > 63 octets long.""" - pass class AbsoluteConcatenation(dns.exception.DNSException): """An attempt was made to append anything other than the empty name to an absolute DNS name.""" - pass class NoParent(dns.exception.DNSException): """An attempt was made to get the parent of the root name or the empty name.""" - pass _escaped = { '"' : True, diff --git a/dns/opcode.py b/dns/opcode.py index 5a68517d..40fe8d1a 100644 --- a/dns/opcode.py +++ b/dns/opcode.py @@ -40,7 +40,6 @@ _by_value = dict([(y, x) for x, y in _by_text.iteritems()]) class UnknownOpcode(dns.exception.DNSException): """An DNS opcode is unknown.""" - pass def from_text(text): """Convert text into an opcode. diff --git a/dns/query.py b/dns/query.py index 6eaf62d1..440c6004 100644 --- a/dns/query.py +++ b/dns/query.py @@ -33,11 +33,9 @@ import dns.rdatatype class UnexpectedSource(dns.exception.DNSException): """A DNS query response came from an unexpected address or port.""" - pass class BadResponse(dns.exception.FormError): """A DNS query response does not respond to the question asked.""" - pass def _compute_expiration(timeout): if timeout is None: diff --git a/dns/rcode.py b/dns/rcode.py index cd43ab5e..372d724f 100644 --- a/dns/rcode.py +++ b/dns/rcode.py @@ -54,7 +54,6 @@ _by_value = dict([(y, x) for x, y in _by_text.iteritems()]) class UnknownRcode(dns.exception.DNSException): """A DNS rcode is unknown.""" - pass def from_text(text): """Convert text into an rcode. diff --git a/dns/rdataclass.py b/dns/rdataclass.py index 96815836..06afa867 100644 --- a/dns/rdataclass.py +++ b/dns/rdataclass.py @@ -67,7 +67,6 @@ _unknown_class_pattern = re.compile('CLASS([0-9]+)$', re.I); class UnknownRdataclass(dns.exception.DNSException): """A DNS class is unknown.""" - pass def from_text(text): """Convert text into a DNS rdata class value. diff --git a/dns/rdataset.py b/dns/rdataset.py index 389205ce..9524979f 100644 --- a/dns/rdataset.py +++ b/dns/rdataset.py @@ -31,11 +31,9 @@ SimpleSet = dns.set.Set class DifferingCovers(dns.exception.DNSException): """An attempt was made to add a DNS SIG/RRSIG whose covered type is not the same as that of the other rdatas in the rdataset.""" - pass class IncompatibleTypes(dns.exception.DNSException): """An attempt was made to add DNS RR data of an incompatible type.""" - pass class Rdataset(dns.set.Set): """A DNS rdataset. diff --git a/dns/rdatatype.py b/dns/rdatatype.py index 5d914ae7..c774db73 100644 --- a/dns/rdatatype.py +++ b/dns/rdatatype.py @@ -181,7 +181,6 @@ _unknown_type_pattern = re.compile('TYPE([0-9]+)$', re.I); class UnknownRdatatype(dns.exception.DNSException): """DNS resource record type is unknown.""" - pass def from_text(text): """Convert text into a DNS rdata type value. diff --git a/dns/rdtypes/ANY/CNAME.py b/dns/rdtypes/ANY/CNAME.py index fb8e9be4..6c6ab35c 100644 --- a/dns/rdtypes/ANY/CNAME.py +++ b/dns/rdtypes/ANY/CNAME.py @@ -21,4 +21,3 @@ class CNAME(dns.rdtypes.nsbase.NSBase): Note: although CNAME is officially a singleton type, dnspython allows non-singleton CNAME rdatasets because such sets have been commonly used by BIND and other nameservers for load balancing.""" - pass diff --git a/dns/rdtypes/ANY/DLV.py b/dns/rdtypes/ANY/DLV.py index 8bd79793..2a360b97 100644 --- a/dns/rdtypes/ANY/DLV.py +++ b/dns/rdtypes/ANY/DLV.py @@ -17,4 +17,3 @@ import dns.rdtypes.dsbase class DLV(dns.rdtypes.dsbase.DSBase): """DLV record""" - pass diff --git a/dns/rdtypes/ANY/DS.py b/dns/rdtypes/ANY/DS.py index 56b6332d..6c669ccc 100644 --- a/dns/rdtypes/ANY/DS.py +++ b/dns/rdtypes/ANY/DS.py @@ -17,4 +17,3 @@ import dns.rdtypes.dsbase class DS(dns.rdtypes.dsbase.DSBase): """DS record""" - pass diff --git a/dns/rdtypes/ANY/MX.py b/dns/rdtypes/ANY/MX.py index 92f41532..c407c11a 100644 --- a/dns/rdtypes/ANY/MX.py +++ b/dns/rdtypes/ANY/MX.py @@ -17,4 +17,3 @@ import dns.rdtypes.mxbase class MX(dns.rdtypes.mxbase.MXBase): """MX record""" - pass diff --git a/dns/rdtypes/ANY/NS.py b/dns/rdtypes/ANY/NS.py index 6b45d4d4..c3d02349 100644 --- a/dns/rdtypes/ANY/NS.py +++ b/dns/rdtypes/ANY/NS.py @@ -17,4 +17,3 @@ import dns.rdtypes.nsbase class NS(dns.rdtypes.nsbase.NSBase): """NS record""" - pass diff --git a/dns/rdtypes/ANY/PTR.py b/dns/rdtypes/ANY/PTR.py index 4a037537..963de63a 100644 --- a/dns/rdtypes/ANY/PTR.py +++ b/dns/rdtypes/ANY/PTR.py @@ -17,4 +17,3 @@ import dns.rdtypes.nsbase class PTR(dns.rdtypes.nsbase.NSBase): """PTR record""" - pass diff --git a/dns/rdtypes/ANY/RRSIG.py b/dns/rdtypes/ANY/RRSIG.py index 5c16052c..7676a55d 100644 --- a/dns/rdtypes/ANY/RRSIG.py +++ b/dns/rdtypes/ANY/RRSIG.py @@ -24,7 +24,6 @@ import dns.rdatatype class BadSigTime(dns.exception.DNSException): """Time in DNS SIG or RRSIG resource record cannot be parsed.""" - pass def sigtime_to_posixtime(what): if len(what) != 14: diff --git a/dns/rdtypes/ANY/RT.py b/dns/rdtypes/ANY/RT.py index f9653fdb..5ba9417b 100644 --- a/dns/rdtypes/ANY/RT.py +++ b/dns/rdtypes/ANY/RT.py @@ -17,4 +17,3 @@ import dns.rdtypes.mxbase class RT(dns.rdtypes.mxbase.UncompressedDowncasingMX): """RT record""" - pass diff --git a/dns/rdtypes/ANY/SPF.py b/dns/rdtypes/ANY/SPF.py index 8860dd72..1df95806 100644 --- a/dns/rdtypes/ANY/SPF.py +++ b/dns/rdtypes/ANY/SPF.py @@ -19,4 +19,3 @@ class SPF(dns.rdtypes.txtbase.TXTBase): """SPF record @see: RFC 4408""" - pass diff --git a/dns/rdtypes/ANY/TXT.py b/dns/rdtypes/ANY/TXT.py index 604fd0f4..f921b369 100644 --- a/dns/rdtypes/ANY/TXT.py +++ b/dns/rdtypes/ANY/TXT.py @@ -17,4 +17,3 @@ import dns.rdtypes.txtbase class TXT(dns.rdtypes.txtbase.TXTBase): """TXT record""" - pass diff --git a/dns/rdtypes/IN/KX.py b/dns/rdtypes/IN/KX.py index c7bd5bbe..a01bddd1 100644 --- a/dns/rdtypes/IN/KX.py +++ b/dns/rdtypes/IN/KX.py @@ -17,4 +17,3 @@ import dns.rdtypes.mxbase class KX(dns.rdtypes.mxbase.UncompressedMX): """KX record""" - pass diff --git a/dns/rdtypes/IN/NSAP_PTR.py b/dns/rdtypes/IN/NSAP_PTR.py index df5b989a..122c5123 100644 --- a/dns/rdtypes/IN/NSAP_PTR.py +++ b/dns/rdtypes/IN/NSAP_PTR.py @@ -17,4 +17,3 @@ import dns.rdtypes.nsbase class NSAP_PTR(dns.rdtypes.nsbase.UncompressedNS): """NSAP-PTR record""" - pass diff --git a/dns/resolver.py b/dns/resolver.py index c2720fc1..0e400229 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -45,11 +45,9 @@ if sys.platform == 'win32': class NXDOMAIN(dns.exception.DNSException): """The DNS query name does not exist.""" - pass class YXDOMAIN(dns.exception.DNSException): """The DNS query name is too long after DNAME substitution.""" - pass # The definition of the Timeout exception has moved from here to the # dns.exception module. We keep dns.resolver.Timeout defined for @@ -94,11 +92,9 @@ class NoNameservers(dns.exception.DNSException): class NotAbsolute(dns.exception.DNSException): """An absolute domain name is required but a relative name was provided.""" - pass class NoRootSOA(dns.exception.DNSException): """There is no SOA RR at the DNS root name. This should never happen!""" - pass class NoMetaqueries(dns.exception.DNSException): """DNS metaqueries are not allowed.""" diff --git a/dns/tokenizer.py b/dns/tokenizer.py index 96e82df8..f1faa722 100644 --- a/dns/tokenizer.py +++ b/dns/tokenizer.py @@ -43,7 +43,6 @@ DELIMITER = 6 class UngetBufferFull(dns.exception.DNSException): """An attempt was made to unget a token when the unget buffer was full.""" - pass class Token(object): """A DNS master file format token. diff --git a/dns/tsig.py b/dns/tsig.py index 01ab5a2f..7c16a9b3 100644 --- a/dns/tsig.py +++ b/dns/tsig.py @@ -26,31 +26,24 @@ import dns.name class BadTime(dns.exception.DNSException): """The current time is not within the TSIG's validity time.""" - pass class BadSignature(dns.exception.DNSException): """The TSIG signature fails to verify.""" - pass class PeerError(dns.exception.DNSException): """Base class for all TSIG errors generated by the remote peer""" - pass class PeerBadKey(PeerError): """The peer didn't know the key we used""" - pass class PeerBadSignature(PeerError): """The peer didn't like the signature we sent""" - pass class PeerBadTime(PeerError): """The peer didn't like the time we sent""" - pass class PeerBadTruncation(PeerError): """The peer didn't like amount of truncation in the TSIG we sent""" - pass # TSIG Algorithms diff --git a/dns/zone.py b/dns/zone.py index b7fc6dd3..453bbb9c 100644 --- a/dns/zone.py +++ b/dns/zone.py @@ -38,19 +38,15 @@ except ImportError: class BadZone(dns.exception.DNSException): """The DNS zone is malformed.""" - pass class NoSOA(BadZone): """The DNS zone has no SOA RR at its origin.""" - pass class NoNS(BadZone): """The DNS zone has no NS RRset at its origin.""" - pass class UnknownOrigin(BadZone): """The DNS zone's origin is unknown.""" - pass class Zone(object): """A DNS zone.