miguelgrinberg / flask-sock

Modern WebSocket support for Flask.
MIT License
272 stars 24 forks source link

Support for Type hints #55

Closed RandomNameUser closed 1 year ago

RandomNameUser commented 1 year ago

I'm trying to use flask-sock in an environment that enforces mypy --strict compatibility.

Would it be possible add type hints to the code? Given that type hints have been around since 3.5 in 2015, I'm somewhat skeptical there are many people left that would have a problem with them.

Thanks!

miguelgrinberg commented 1 year ago

Honestly I would prefer that someone contributes type hints for this package to typeshed. I personally do not rely on type hints or mypy, so maintaining type hints in this (and my many other) packages would add a considerable effort. Consider that the Python standard library uses the same approach, all of its type hints are hosted on the typeshed project.

RandomNameUser commented 1 year ago

Agreed. Didn't know about typeshed, thanks for the hint.