From: Bob Halley Date: Sat, 17 May 2025 14:42:34 +0000 (-0700) Subject: Fix missing references [#1193] X-Git-Tag: v2.8.0rc1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=580f478af9ee24bf38c22caf585270e60f22b43f;p=thirdparty%2Fdnspython.git Fix missing references [#1193] --- diff --git a/dns/edns.py b/dns/edns.py index ef57fbe9..8eebf901 100644 --- a/dns/edns.py +++ b/dns/edns.py @@ -33,6 +33,8 @@ import dns.wire class OptionType(dns.enum.IntEnum): + """EDNS option type codes""" + #: NSID NSID = 3 #: DAU @@ -326,6 +328,8 @@ class ECSOption(Option): # lgtm[py/missing-equals] class EDECode(dns.enum.IntEnum): + """DNS EDE codes""" + OTHER = 0 UNSUPPORTED_DNSKEY_ALGORITHM = 1 UNSUPPORTED_DS_DIGEST_TYPE = 2 diff --git a/dns/wire.py b/dns/wire.py index 9f9b1573..cd027fa1 100644 --- a/dns/wire.py +++ b/dns/wire.py @@ -9,7 +9,16 @@ import dns.name class Parser: + """Helper class for parsing DNS wire format.""" + def __init__(self, wire: bytes, current: int = 0): + """Initialize a Parser + + *wire*, a ``bytes`` contains the data to be parsed, and possibly other data. + Typically it is the whole message or a slice of it. + + *current*, an `int`, the offset within *wire* where parsing should begin. + """ self.wire = wire self.current = 0 self.end = len(self.wire) diff --git a/doc/Makefile b/doc/Makefile index acf8f99c..aad55329 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -17,4 +17,4 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) -n $(O) diff --git a/doc/message-edns.rst b/doc/message-edns.rst index 21d106db..8424fa13 100644 --- a/doc/message-edns.rst +++ b/doc/message-edns.rst @@ -9,6 +9,8 @@ treated much like Rdata. For example, if dnspython encounters the EDNS ``ECS`` option code when parsing a DNS wire format message, it will create a ``dns.edns.ECSOption`` object to represent it. +.. autoclass:: dns.edns.OptionType + .. autodata:: dns.edns.NSID .. autodata:: dns.edns.DAU .. autodata:: dns.edns.DHU @@ -29,6 +31,8 @@ will create a ``dns.edns.ECSOption`` object to represent it. .. autoclass:: dns.edns.ECSOption :members: +.. autoclass:: dns.edns.EDECode + .. autoclass:: dns.edns.EDEOption :members: diff --git a/doc/utilities.rst b/doc/utilities.rst index 88c1f72e..85de5071 100644 --- a/doc/utilities.rst +++ b/doc/utilities.rst @@ -19,3 +19,6 @@ Miscellaneous Utilities .. automodule:: dns.version :members: + +.. automodule:: dns.wire + :members: