Skip to content

Commit

Permalink
Fix type stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed May 7, 2022
1 parent d97f474 commit 74fcb91
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 135 deletions.
22 changes: 14 additions & 8 deletions robyn/processpool.pyi
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
from numbers import Number
from robyn.ws import WS
from robyn.events import Events
from robyn.robyn import SocketHeld

from typing import Dict, Tuple, Callable

Route = Tuple[str, str, Callable, bool, int]


def spawn_process(
directories: tuple,
headers: tuple,
routes: tuple,
middlewares: tuple,
web_sockets: list,
event_handlers: dict,
directories: Tuple[str, str, str, str],
headers: Tuple[str, str],
routes: Tuple[Route],
middlewares: Tuple[Route],
web_sockets: Dict[str, WS],
event_handlers: Dict[Events, list],
socket: SocketHeld,
workers: Number,
) -> None:
Expand All @@ -18,8 +24,8 @@ def spawn_process(
:param directories tuple: the list of all the directories and related data in a tuple
:param headers tuple: All the global headers in a tuple
:param routes tuple: The routes touple, containing the description about every route.
:param middlewares tuple: The middleware router touple, containing the description about every route.
:param routes Tuple[Route]: The routes touple, containing the description about every route.
:param middlewares Tuple[Route]: The middleware router touple, containing the description about every route.
:param web_sockets list: This is a list of all the web socket routes
:param event_handlers Dict: This is an event dict that contains the event handlers
:param socket SocketHeld: This is the main tcp socket, which is being shared across multiple processes.
Expand Down
126 changes: 0 additions & 126 deletions robyn/robyn.cpython-38-darwin.pyi

This file was deleted.

4 changes: 3 additions & 1 deletion robyn/router.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from abc import ABC, abstractmethod
from robyn.ws import WS
from typing import Callable
from typing import Callable, List, Tuple

Routes = List[Tuple[str, str, Callable, bool, int]]


class BaseRouter(ABC):
Expand Down

0 comments on commit 74fcb91

Please sign in to comment.