From bd11c3215240708c0a725cfee8f4b822c0f1cc23 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Sat, 29 Jan 2022 22:43:20 +0100 Subject: fix various typing issues (typos) I stumbled over a few typos and then decided to fix 'em all (cherry picked from commit a593b38d892f6b5b2180086157d73bff181f1475) --- dns/_immutable_attr.py | 2 +- dns/dnssec.py | 2 +- dns/message.py | 2 +- dns/query.py | 4 ++-- dns/rdataset.py | 2 +- dns/rdtypes/svcbbase.py | 2 +- dns/renderer.py | 4 ++-- dns/resolver.py | 6 +++--- dns/transaction.py | 2 +- dns/versioned.py | 2 +- doc/message-edns.rst | 2 +- doc/rdata-subclasses.rst | 6 +++--- doc/resolver-class.rst | 2 +- doc/resolver.rst | 2 +- doc/rfc.rst | 2 +- tests/nanonameserver.py | 2 +- tests/test_message.py | 4 ++-- tests/test_tokenizer.py | 2 +- tests/test_zone.py | 2 +- 19 files changed, 26 insertions(+), 26 deletions(-) diff --git a/dns/_immutable_attr.py b/dns/_immutable_attr.py index f7b9f8b..4d89be9 100644 --- a/dns/_immutable_attr.py +++ b/dns/_immutable_attr.py @@ -49,7 +49,7 @@ def _immutable_init(f): f(*args, **kwargs) finally: if not previous: - # If we started the initialzation, establish immutability + # If we started the initialization, establish immutability # by removing the attribute that allows mutation object.__delattr__(args[0], '_immutable_init') nf.__signature__ = inspect.signature(f) diff --git a/dns/dnssec.py b/dns/dnssec.py index 6e9946f..dee4e61 100644 --- a/dns/dnssec.py +++ b/dns/dnssec.py @@ -108,7 +108,7 @@ def key_id(key): return total & 0xffff class DSDigest(dns.enum.IntEnum): - """DNSSEC Delgation Signer Digest Algorithm""" + """DNSSEC Delegation Signer Digest Algorithm""" SHA1 = 1 SHA256 = 2 diff --git a/dns/message.py b/dns/message.py index 1e67a17..c2751a9 100644 --- a/dns/message.py +++ b/dns/message.py @@ -509,7 +509,7 @@ class Message: expected to return a key. *keyname*, a ``dns.name.Name``, ``str`` or ``None``, the name of - thes TSIG key to use; defaults to ``None``. If *keyring* is a + this TSIG key to use; defaults to ``None``. If *keyring* is a ``dict``, the key must be defined in it. If *keyring* is a ``dns.tsig.Key``, this is ignored. diff --git a/dns/query.py b/dns/query.py index fbf76d8..6d924b5 100644 --- a/dns/query.py +++ b/dns/query.py @@ -1085,10 +1085,10 @@ def inbound_xfr(where, txn_manager, query=None, *udp_mode*, a ``dns.query.UDPMode``, determines how UDP is used for IXFRs. The default is ``dns.UDPMode.NEVER``, i.e. only use - TCP. Other possibilites are ``dns.UDPMode.TRY_FIRST``, which + TCP. Other possibilities are ``dns.UDPMode.TRY_FIRST``, which means "try UDP but fallback to TCP if needed", and ``dns.UDPMode.ONLY``, which means "try UDP and raise - ``dns.xfr.UseTCP`` if it does not succeeed. + ``dns.xfr.UseTCP`` if it does not succeed. Raises on errors. """ diff --git a/dns/rdataset.py b/dns/rdataset.py index e69ee23..579bc96 100644 --- a/dns/rdataset.py +++ b/dns/rdataset.py @@ -312,7 +312,7 @@ class Rdataset(dns.set.Set): def processing_order(self): """Return rdatas in a valid processing order according to the type's specification. For example, MX records are in preference order from - lowest to highest preferences, with items of the same perference + lowest to highest preferences, with items of the same preference shuffled. For types that do not define a processing order, the rdatas are diff --git a/dns/rdtypes/svcbbase.py b/dns/rdtypes/svcbbase.py index 09d7a52..3362571 100644 --- a/dns/rdtypes/svcbbase.py +++ b/dns/rdtypes/svcbbase.py @@ -435,7 +435,7 @@ class SVCBBase(dns.rdata.Rdata): if not isinstance(v, Param) and v is not None: raise ValueError("not a Param") self.params = dns.immutable.Dict(params) - # Make sure any paramater listed as mandatory is present in the + # Make sure any parameter listed as mandatory is present in the # record. mandatory = params.get(ParamKey.MANDATORY) if mandatory: diff --git a/dns/renderer.py b/dns/renderer.py index 72f0f7a..4e4391c 100644 --- a/dns/renderer.py +++ b/dns/renderer.py @@ -49,8 +49,8 @@ class Renderer: r.add_rrset(dns.renderer.ANSWER, rrset_2) r.add_rrset(dns.renderer.AUTHORITY, ns_rrset) r.add_edns(0, 0, 4096) - r.add_rrset(dns.renderer.ADDTIONAL, ad_rrset_1) - r.add_rrset(dns.renderer.ADDTIONAL, ad_rrset_2) + r.add_rrset(dns.renderer.ADDITIONAL, ad_rrset_1) + r.add_rrset(dns.renderer.ADDITIONAL, ad_rrset_2) r.write_header() r.add_tsig(keyname, secret, 300, 1, 0, '', request_mac) wire = r.get_wire() diff --git a/dns/resolver.py b/dns/resolver.py index 166f849..874221d 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -1101,7 +1101,7 @@ class Resolver(BaseResolver): """Query nameservers to find the answer to the question. This method calls resolve() with ``search=True``, and is - provided for backwards compatbility with prior versions of + provided for backwards compatibility with prior versions of dnspython. See the documentation for the resolve() method for further details. """ @@ -1200,7 +1200,7 @@ def query(qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN, """Query nameservers to find the answer to the question. This method calls resolve() with ``search=True``, and is - provided for backwards compatbility with prior versions of + provided for backwards compatibility with prior versions of dnspython. See the documentation for the resolve() method for further details. """ @@ -1253,7 +1253,7 @@ def zone_for_name(name, rdclass=dns.rdataclass.IN, tcp=False, resolver=None, root servers in your network and they are misconfigured.) Raises ``dns.resolver.LifetimeTimeout`` if the answer could not be - found in the alotted lifetime. + found in the allotted lifetime. Returns a ``dns.name.Name``. """ diff --git a/dns/transaction.py b/dns/transaction.py index 846db4e..d725492 100644 --- a/dns/transaction.py +++ b/dns/transaction.py @@ -560,7 +560,7 @@ class Transaction: *commit*, a bool. If ``True``, commit the transaction, otherwise roll it back. - If committing adn the commit fails, then roll back and raise an + If committing and the commit fails, then roll back and raise an exception. """ raise NotImplementedError # pragma: no cover diff --git a/dns/versioned.py b/dns/versioned.py index 42f2c81..8b6c275 100644 --- a/dns/versioned.py +++ b/dns/versioned.py @@ -131,7 +131,7 @@ class Zone(dns.zone.Zone): # # We only wake one sleeper at a time, so it's important # that no event waiter can exit this method (e.g. via - # cancelation) without returning a transaction or waking + # cancellation) without returning a transaction or waking # someone else up. # # This is not a problem with Threading module threads as diff --git a/doc/message-edns.rst b/doc/message-edns.rst index b46cf54..4fe78dc 100644 --- a/doc/message-edns.rst +++ b/doc/message-edns.rst @@ -5,7 +5,7 @@ Message EDNS Options EDNS allows for larger messages and also provides an extension mechanism for the protocol. EDNS *options* are typed data, and are -treated much like Rdata. For example, if dnsython encouters the EDNS +treated much like Rdata. For example, if dnsython encounters the EDNS ``ECS`` option code when parsing a DNS wire format message, it will create a ``dns.edns.ECSOption`` object to represent it. diff --git a/doc/rdata-subclasses.rst b/doc/rdata-subclasses.rst index 17a537a..a1f2d81 100644 --- a/doc/rdata-subclasses.rst +++ b/doc/rdata-subclasses.rst @@ -322,7 +322,7 @@ Rdata Subclass Reference An ``int``, the flags. - .. attribute:: interations: + .. attribute:: iterations: An ``int``, the number of iterations. @@ -349,7 +349,7 @@ Rdata Subclass Reference An ``int``, the flags. - .. attribute:: interations: + .. attribute:: iterations: An ``int``, the number of iterations. @@ -535,7 +535,7 @@ Rdata Subclass Reference .. autoclass:: dns.rdtypes.ANY.URI.URI :members: - .. attribute:: priorty + .. attribute:: priority An ``int``, the priority. diff --git a/doc/resolver-class.rst b/doc/resolver-class.rst index 99cf70e..c94f8f6 100644 --- a/doc/resolver-class.rst +++ b/doc/resolver-class.rst @@ -29,7 +29,7 @@ The dns.resolver.Resolver and dns.resolver.Answer Classes .. attribute:: port - An ``int``, the default DNS port to send to if not overriden by + An ``int``, the default DNS port to send to if not overridden by *nameserver_ports*. The default value is 53. .. attribute:: nameserver_ports diff --git a/doc/resolver.rst b/doc/resolver.rst index 232ed66..e9cf7b2 100644 --- a/doc/resolver.rst +++ b/doc/resolver.rst @@ -7,7 +7,7 @@ Stub Resolver Dnspython's resolver module implements a "stub resolver", which does DNS recursion with the aid of a remote "full resolver" provided by an ISP or other service provider. By default, dnspython will use the full -resolver specifed by its host system, but another resolver can easily +resolver specified by its host system, but another resolver can easily be used simply by setting the *nameservers* attribute. .. toctree:: diff --git a/doc/rfc.rst b/doc/rfc.rst index 6f11a54..88ce285 100644 --- a/doc/rfc.rst +++ b/doc/rfc.rst @@ -16,7 +16,7 @@ list because there are many DNSSEC related RFCs and it's helpful to group them together. It's not a statement that DNSSEC isn't part of the "Core" of the DNS. -The IANA `DNS Parameters `_ registry is the offical reference site for all DNS +The IANA `DNS Parameters `_ registry is the official reference site for all DNS constants. diff --git a/tests/nanonameserver.py b/tests/nanonameserver.py index 5c9a9c7..3391b32 100644 --- a/tests/nanonameserver.py +++ b/tests/nanonameserver.py @@ -215,7 +215,7 @@ class Server(threading.Thread): except Exception: # We could try to make a response from only the header # if dnspython had a header_only option to - # from_wire(), or if we truncated wire outselves, but + # from_wire(), or if we truncated wire ourselves, but # for now we just drop. return try: diff --git a/tests/test_message.py b/tests/test_message.py index ff9f550..b0112ae 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -468,7 +468,7 @@ class MessageTestCase(unittest.TestCase): self.assertEqual(te.message(), q) def test_bad_opt(self): - # Not in addtional + # Not in additional q = dns.message.Message(id=1) opt = dns.rdtypes.ANY.OPT.OPT(1200, dns.rdatatype.OPT, ()) rrs = dns.rrset.from_rdata(dns.name.root, 0, opt) @@ -494,7 +494,7 @@ class MessageTestCase(unittest.TestCase): def test_bad_tsig(self): keyname = dns.name.from_text('key.') - # Not in addtional + # Not in additional q = dns.message.Message(id=1) tsig = dns.rdtypes.ANY.TSIG.TSIG(dns.rdataclass.ANY, dns.rdatatype.TSIG, dns.tsig.HMAC_SHA256, 0, 300, b'1234', diff --git a/tests/test_tokenizer.py b/tests/test_tokenizer.py index 6134d4b..06f4177 100644 --- a/tests/test_tokenizer.py +++ b/tests/test_tokenizer.py @@ -325,7 +325,7 @@ class TokenizerTestCase(unittest.TestCase): def testBadConcatenateRemaining(self): with self.assertRaises(dns.exception.SyntaxError): - tok = dns.tokenizer.Tokenizer('a b "not an identifer" c') + tok = dns.tokenizer.Tokenizer('a b "not an identifier" c') tok.concatenate_remaining_identifiers() def testStdinFilename(self): diff --git a/tests/test_zone.py b/tests/test_zone.py index d0765df..4b5272d 100644 --- a/tests/test_zone.py +++ b/tests/test_zone.py @@ -801,7 +801,7 @@ class ZoneTestCase(unittest.TestCase): self.assertEqual(rrs[0].target, n2008) def testZoneMiscCases(self): - # test that leading whitespace folllowed by EOL is treated like + # test that leading whitespace followed by EOL is treated like # a blank line, and that out-of-zone names are dropped. z1 = dns.zone.from_text(misc_cases_input, 'example.') z2 = dns.zone.from_text(misc_cases_expected, 'example.') -- cgit v1.2.1