From 620d87c7111afc95be771f68af5d87228859f2af Mon Sep 17 00:00:00 2001 From: Nicholas Hairs Date: Fri, 3 Nov 2023 20:06:48 +1100 Subject: [PATCH] [rules] Include `Response` in `ResponseFunction` type alias --- pyproject.toml | 2 +- src/nserver/rules.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e422561..7984048 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "nserver" -version = "1.0.0" +version = "1.0.1" description = "DNS Name Server Framework" authors = [ {name = "Nicholas Hairs", email = "info+nserver@nicholashairs.com"}, diff --git a/src/nserver/rules.py b/src/nserver/rules.py index 60b3621..ca05b9f 100644 --- a/src/nserver/rules.py +++ b/src/nserver/rules.py @@ -10,12 +10,12 @@ import tldextract ## Application -from .models import Query +from .models import Query, Response from .records import RecordBase ### CLASSES ### ============================================================================ -ResponseFunction = Callable[[Query], Union[None, RecordBase, List[RecordBase]]] +ResponseFunction = Callable[[Query], Union[None, RecordBase, List[RecordBase], Response]] """ Type Alias for functions that will be called when a rule is matched """