drf-rw-serializers icon indicating copy to clipboard operation
drf-rw-serializers copied to clipboard

Add support for type hints

Open sshishov opened this issue 1 year ago • 6 comments

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

sshishov avatar Dec 06 '23 14:12 sshishov

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

fjsj avatar Dec 11 '23 17:12 fjsj

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...

sshishov avatar Dec 16 '23 18:12 sshishov

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 avatar Dec 18 '23 12:12 fjsj

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

fjsj avatar Dec 18 '23 16:12 fjsj

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.

sshishov avatar Jun 04 '24 20:06 sshishov

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

fjsj avatar Jun 05 '24 13:06 fjsj