From: Frantisek Tobias Date: Tue, 27 Jan 2026 15:07:06 +0000 (+0100) Subject: python/formating: nits X-Git-Tag: v6.2.0~2^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92d9023c5933ff831d90c30938041808c0c97265;p=thirdparty%2Fknot-resolver.git python/formating: nits --- diff --git a/doc/_static/config.schema.json b/doc/_static/config.schema.json index b934f0982..1a4567f7e 100644 --- a/doc/_static/config.schema.json +++ b/doc/_static/config.schema.json @@ -380,7 +380,7 @@ }, "require-retry": { "type": "boolean", - "description": "Require address validation for unknown source addresses. Adds a 1-RTT delay to connection establishment.", + "description": "Require address validation for unknown source addresses. This adds a 1-RTT delay to connection establishment.", "default": false } }, diff --git a/python/knot_resolver/datamodel/network_schema.py b/python/knot_resolver/datamodel/network_schema.py index d6712f287..c4b5f3e93 100644 --- a/python/knot_resolver/datamodel/network_schema.py +++ b/python/knot_resolver/datamodel/network_schema.py @@ -4,8 +4,8 @@ from knot_resolver.constants import WATCHDOG_LIB from knot_resolver.datamodel.types import ( EscapedStr32B, Int0_512, - Int1_4096, Int0_65535, + Int1_4096, InterfaceOptionalPort, IPAddress, IPAddressEM, @@ -52,23 +52,25 @@ class AddressRenumberingSchema(ConfigSchema): class QUICSchema(ConfigSchema): class Raw(ConfigSchema): """ - Optional DoQ configuration + Optional DoQ configuration. --- max_conns: Maximum number of active connections a single worker is allowed to accept. max_streams: Maximum number of concurrent streams a connection is allowed to open. - require_retry: Require address validation for unknown source addresses. Adds a 1-RTT delay to connection establishment. + require_retry: Require address validation for unknown source addresses. + This adds a 1-RTT delay to connection establishment. """ max_conns: Int1_4096 = Int1_4096(1024) max_streams: Int1_4096 = Int1_4096(1024) - require_retry: bool = False; + require_retry: bool = False _LAYER = Raw max_conns: Int1_4096 = Int1_4096(1024) max_streams: Int1_4096 = Int1_4096(1024) - require_retry: bool = False; + require_retry: bool = False + class TLSSchema(ConfigSchema): class Raw(ConfigSchema): @@ -161,7 +163,7 @@ class ListenSchema(ConfigSchema): return origin.port # default port number based on kind if origin.interface: - if origin.kind == "dot" or origin.kind == "doq": + if origin.kind in ["dot", "doq"]: return PortNumber(853) if origin.kind in ["doh-legacy", "doh2"]: return PortNumber(443) diff --git a/python/knot_resolver/datamodel/types/__init__.py b/python/knot_resolver/datamodel/types/__init__.py index bf6439c97..e30312c9d 100644 --- a/python/knot_resolver/datamodel/types/__init__.py +++ b/python/knot_resolver/datamodel/types/__init__.py @@ -9,8 +9,8 @@ from .types import ( IDPattern, Int0_32, Int0_512, - Int1_4096, Int0_65535, + Int1_4096, InterfaceName, InterfaceOptionalPort, InterfacePort,