Skip to content

Commit

Permalink
Split commands into subcommands using the routing syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Askaholic committed Sep 25, 2020
1 parent ca2be95 commit e72650f
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 199 deletions.
6 changes: 2 additions & 4 deletions server/core/router.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import contextlib
from typing import Any, Callable, Dict, List, Optional
from typing import Any, Dict, List, Optional

from .typedefs import Handler, Message

HandlerDecorator = Callable[[Handler], Handler]
from .typedefs import Handler, HandlerDecorator, Message


class RouteError(Exception):
Expand Down
1 change: 1 addition & 0 deletions server/core/typedefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Type aliases
Handler = Callable[..., Any]
HandlerDecorator = Callable[[Handler], Handler]
Message = Dict[Any, Any]


Expand Down
Loading

0 comments on commit e72650f

Please sign in to comment.