sparckles / Robyn

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
https://robyn.tech/
BSD 2-Clause "Simplified" License
4.46k stars 231 forks source link

Fix mypy warnings in router.py #1038

Closed dave42w closed 3 days ago

dave42w commented 1 week ago

Description

This PR fixes most of the mypy warnings in router.py

Summary

This PR does not fix https://github.com/sparckles/Robyn/issues/1035 where add_route is inconsistent between the BaseRouter(ABC) and it's subclasses.

The biggest changes were in Router. _format_response

Beyond that a few places with a missing dict type: for injected_dependencies x 2 and self.reoutes x 1

PR Checklist

Please ensure that:

Pre-Commit Instructions:

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
robyn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 10:46pm
codspeed-hq[bot] commented 1 week ago

CodSpeed Performance Report

Merging #1038 will not alter performance

Comparing dave42w:mypy2 (be555e7) with main (3f2e79a)

Summary

✅ 146 untouched benchmarks