dabapps/django-zen-queries

Strategy to provide type hints

rik opened this issue · 5 comments

rik commented

I'd like to provide some type hints for this library but before doing so, I'd like to ask what are your plans in that regard.

There are currently no direct plans to add types, but we'd definitely welcome a PR! Personally i'm all for types!

We usually use mypy to type-check projects, so using that would be ideal, and we definitely need to maintain support for the currently supported versions:

Django 1.8, 1.11, 2.0, 2.1 and 2.2 on Python 2.7, 3.5, 3.6 and 3.7

rik commented

If this was a Py3 only project, I would have used inline hints. With Py2 compatibility, stub files look a bit more interesting than inline comments. What would you prefer?

I suspect inline comments is probably a better way to go, it's a more common implementation, and makes converting to full inline hints a little simpler!

Hello everybody! comments help to understand what has been done here.

j4mie commented

No plans to add type hints.