]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
python/formating: nits
authorFrantisek Tobias <frantisek.tobias@nic.cz>
Tue, 27 Jan 2026 15:07:06 +0000 (16:07 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 29 Jan 2026 10:58:19 +0000 (11:58 +0100)
doc/_static/config.schema.json
python/knot_resolver/datamodel/network_schema.py
python/knot_resolver/datamodel/types/__init__.py

index b934f09826bf57bcceeff0057ab6d56a753247dd..1a4567f7e12b96c67bdf65aff41460bbd01edbb4 100644 (file)
                         },
                         "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
                         }
                     },
index d6712f2875a9533559393fbd07705760c01441f5..c4b5f3e934447f60038b3a3ca54b05ef941290c2 100644 (file)
@@ -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)
index bf6439c972fa6313feef6005a93b55d5deca65e5..e30312c9d554a12b06bbd5419da68993b00304cb 100644 (file)
@@ -9,8 +9,8 @@ from .types import (
     IDPattern,
     Int0_32,
     Int0_512,
-    Int1_4096,
     Int0_65535,
+    Int1_4096,
     InterfaceName,
     InterfaceOptionalPort,
     InterfacePort,