]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
fix various typing issues (typos)
authorSebastian Wagner <sebix@sebix.at>
Sat, 29 Jan 2022 21:43:20 +0000 (22:43 +0100)
committerBob Halley <halley@play-bow.org>
Sat, 29 Jan 2022 23:17:27 +0000 (15:17 -0800)
I stumbled over a few typos and then decided to fix 'em all

(cherry picked from commit a593b38d892f6b5b2180086157d73bff181f1475)

19 files changed:
dns/_immutable_attr.py
dns/dnssec.py
dns/message.py
dns/query.py
dns/rdataset.py
dns/rdtypes/svcbbase.py
dns/renderer.py
dns/resolver.py
dns/transaction.py
dns/versioned.py
doc/message-edns.rst
doc/rdata-subclasses.rst
doc/resolver-class.rst
doc/resolver.rst
doc/rfc.rst
tests/nanonameserver.py
tests/test_message.py
tests/test_tokenizer.py
tests/test_zone.py

index f7b9f8b0b7a48e46e4e3cbcbaab4eeb3c61fa1e5..4d89be9056563a0db58205aff410961bdefb4044 100644 (file)
@@ -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)
index 6e9946f4f344305c8c3f1a0ab8455c46e2b8da90..dee4e61813216f377703fc61f1132865a89254b4 100644 (file)
@@ -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
index 1e67a17b8e2e30de9099aa103c71724bd19f741f..c2751a90c8f6f03accb2f3c298d7ff0d40e6265b 100644 (file)
@@ -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.
 
index fbf76d8bcce49d2a67cbf46cb2420c0deb37e12a..6d924b5fe5c25d07c429f5cbd095f2e7d26b08c5 100644 (file)
@@ -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.
     """
index e69ee2325aee6a74675f02bede9d28ca737b0812..579bc96499e3fe29fc946b0ea39a04af21f9a710 100644 (file)
@@ -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
index 09d7a52baedc5945b15af29d62747d7edfb724d4..3362571c46e8aa4e1c67e053280465f4e95c8c01 100644 (file)
@@ -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:
index 72f0f7a8a36d00b28efc8d0d78667241985f25df..4e4391cd29e45ca69b99f55cdb505b257e46eccf 100644 (file)
@@ -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()
index 166f84921e7fbb3d996f58755fe96558965b7519..874221d1d6100d84a2bbff9ad39055d3e4887ab5 100644 (file)
@@ -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``.
     """
index 846db4ec30048cdbad230126d21739a5133d3f53..d725492432877205735decb844b65d50e1e2410b 100644 (file)
@@ -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
index 42f2c8140bd10181ca0067aaabb3cc0cb13a0458..8b6c275fd2398875f2fbd03bfd16aa39ba737bff 100644 (file)
@@ -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
index b46cf541cc7b5973953b18f2a6390067071e11d9..4fe78dc8f2b1b927d9e81829a27e7a01e98ebffc 100644 (file)
@@ -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.
 
index 17a537a3759b4ef3b5eb880f9f20681f73cfc1e8..a1f2d81238fbbf47d69c60d95afecc1b50c73b3e 100644 (file)
@@ -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.
 
index 99cf70e317108bd0a968a391742ff06187dc6842..c94f8f6a8d3dd620c99f7e56c26c2dceb16c68ff 100644 (file)
@@ -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
index 232ed66d2b2aa82142af51240cf07edc513a7aab..e9cf7b2e6c57f65916152c0f0ccf204109229809 100644 (file)
@@ -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::
index 6f11a548eb0a8ef02a0e2f6a7015d18f296cce4e..88ce285580a820bc7379b4fc4089a546c27a12d5 100644 (file)
@@ -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 <http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml>`_ registry is the offical reference site for all DNS
+The IANA `DNS Parameters <http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml>`_ registry is the official reference site for all DNS
 constants.
 
 
index 5c9a9c7e33e0d7655ae2fbfce26f4a4fffb771c0..3391b3233856ebdc57be92bd848fce5cf12efbad 100644 (file)
@@ -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:
index ff9f550b48e3b3924452dd71d30a7fcc3162fba7..b0112aea4cb1816d7263aeac63fdeafc16ddd229 100644 (file)
@@ -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',
index 6134d4b2e2e73573459b4b109174393e1e8997f6..06f41776ea95663ab051a121db55179b6e32b978 100644 (file)
@@ -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):
index d0765df1f7fc5e8900f8224ae69b40f5e2ffb7a5..4b5272da04cd6fd4ba6911a18218f57ee112c377 100644 (file)
@@ -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.')