alanjds / drf-nested-routers

Nested Routers for Django Rest Framework
https://pypi.org/project/drf-nested-routers/
Apache License 2.0
1.68k stars 160 forks source link

Proposal: Add embedded type hints #337

Closed intgr closed 5 months ago

intgr commented 6 months ago

I'm using djangorestframework along with djangorestframework-stubs for type checking.

I noticed that drf-nested-routers does not currently have type hints, nor are there any "stubs" packages available.

Would you be interested in a PR that adds type hints directly into the drf-nested-routers project?

alanjds commented 6 months ago

Hi, @intgr. I really like the idea.

Would you be interested in a PR that adds type hints directly into the drf-nested-routers project?

Sure I am.

On the past, some Python versions did not supported typehints and I would not like to keep the burden of maintain stubs, but this is my personal approach.

As Python 3.8 is the minimum version I do not see a reason to not have typehints directly in the project. Be said that I would also accept a PR with stubs anyway, yet I prefer them directly on the sourcecode.