vintasoftware / drf-rw-serializers

Generic views, viewsets and mixins that extend the Django REST Framework ones adding separated serializers for read and write operations
MIT License
177 stars 28 forks source link

Add support for type hints #58

Open sshishov opened 9 months ago

sshishov commented 9 months ago

If yes, any possibility to add support of type hints? as DRF supports type hints but with the usage of this library, all the type checks vanished

fjsj commented 9 months ago

Hi, yes. Feel free to open a PR with this support and we can launch a new version with it.

sshishov commented 9 months ago

Great @fjsj , let me try to add type hints, as I have a test repo to validate it. If we want to make sure that our type hints are correct, we have to have at least some kind of pipeline or tests...

fjsj commented 9 months ago

The tests used to run in Travis. We need to migrate to GitHub Actions, which shouldn't be too difficult. If you can, please feel free to include that in your PR.

fjsj commented 9 months ago

@sshishov we'll migrate to GH Actions right now, no need to include that in your PR.

sshishov commented 3 months ago

Hello,

currently we are using stubs file for our usage.

Do you prefer the "stubs" file or you want to include the typing in the code? Based on this I can create the MR.

NOTE: stubs is just *.pyi indicating types for classes, functions, modules. For our codebase we are using the typing in-place, and we are using only Py3 support. I guess more preferably would be to use in-place, but everyone has its own taste.

fjsj commented 3 months ago

You can include typing in code directly in-place @sshishov Thanks!