From bad9fd0258d3e055f54d15c8a81b8f5914dfba89 Mon Sep 17 00:00:00 2001 From: Adam Hopkins Date: Sun, 21 Feb 2021 21:29:54 +0200 Subject: [PATCH] Cleanup type checking --- sanic/models/protocol_types.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sanic/models/protocol_types.py diff --git a/sanic/models/protocol_types.py b/sanic/models/protocol_types.py new file mode 100644 index 00000000..48616ad5 --- /dev/null +++ b/sanic/models/protocol_types.py @@ -0,0 +1,9 @@ +from typing import Protocol, Union + + +class TransportProtocol(Protocol): + def get_protocol(self): + ... + + def get_extra_info(self, info: str) -> Union[str, bool, None]: + ...