Skip to content

Commit

Permalink
Two tiny corrections found by mypy 1.13 (#1032)
Browse files Browse the repository at this point in the history
* Fixed reuse of local route_type as different types

* added dict type to self.methods
  • Loading branch information
dave42w authored Nov 16, 2024
1 parent 31283b2 commit 51bf8a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions robyn/processpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def spawn_process(
for middleware_type, middleware_function in global_middlewares:
server.add_global_middleware(middleware_type, middleware_function)

for route_type, endpoint, function in route_middlewares:
server.add_middleware_route(route_type, endpoint, function)
for http_route_type, endpoint, function in route_middlewares:
server.add_middleware_route(http_route_type, endpoint, function)

if Events.STARTUP in event_handlers:
server.add_startup_handler(event_handlers[Events.STARTUP])
Expand Down
2 changes: 1 addition & 1 deletion robyn/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class WebSocket:
def __init__(self, robyn_object: "Robyn", endpoint: str, config: Config = Config(), dependencies: DependencyMap = DependencyMap()) -> None:
self.robyn_object = robyn_object
self.endpoint = endpoint
self.methods = {}
self.methods: dict = {}
self.config = config
self.dependencies = dependencies

Expand Down

0 comments on commit 51bf8a3

Please sign in to comment.