Skip to content

Commit

Permalink
Add some ClassVar typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins committed Jul 9, 2023
1 parent 12c1b0a commit eae8659
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sanic/mixins/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
TYPE_CHECKING,
Any,
Callable,
ClassVar,
Dict,
List,
Mapping,
Expand Down Expand Up @@ -87,16 +88,17 @@


class StartupMixin(metaclass=SanicMeta):
_app_registry: Dict[str, Sanic]
_app_registry: ClassVar[Dict[str, Sanic]]

config: Config
listeners: Dict[str, List[ListenerType[Any]]]
state: ApplicationState
websocket_enabled: bool
multiplexer: WorkerMultiplexer
test_mode: bool
start_method: StartMethod = _default

START_METHOD_SET = False
test_mode: ClassVar[bool]
start_method: ClassVar[StartMethod] = _default
START_METHOD_SET: ClassVar[bool] = False

def setup_loop(self):
if not self.asgi:
Expand Down

0 comments on commit eae8659

Please sign in to comment.