Re: Static type checking for public API

2015-10-11 Thread Aymeric Augustin
Hi John, In case that’s not clear from the answers above, your question roughly translates to “can you do dozens of hours of very boring work and increase your maintenance workload in the future for no discernible benefit to you, just because I ask?” There’s no way that could be met with a

Re: Static type checking for public API

2015-10-11 Thread Florian Apolloner
No we can't (at least not till we drop python 2). You are free to write your own stub files though, this can easily live as a separate repo for now imo… On Sunday, October 11, 2015 at 3:22:17 PM UTC+2, John Michael Lafayette wrote: > > Python now has static type checking. All you do is follow

Re: Static type checking for public API

2015-10-11 Thread Donald Stufft
It supports a mode that is comparable with Python 2.x, but which isn’t as nice. You essentially need to ship additional stub files that just have the type hints in them. On October 11, 2015 at 1:13:20 PM, Collin Anderson (cmawebs...@gmail.com) wrote: Hi John, I think we need to wait until we

Re: Static type checking for public API

2015-10-11 Thread Collin Anderson
Hi John, I think we need to wait until we drop Python 2.x support to be able to do this, as 2.x won't accept this syntax. Does that sound right? Thanks, Collin On Sunday, October 11, 2015 at 9:22:17 AM UTC-4, John Michael Lafayette wrote: > > Python now has static type checking. All you do

Re: Static typing for python methods

2015-10-11 Thread Michael Manfre
Django can't include the inline type hinting syntax for many years, but we can add stub files. Keeping the stubs in sync with the code will be more effort and we'd want some sort of automated tooling to help with that, but I'm not opposed to adding stub files for the public APIs. Assuming no core

Fwd: Static typing for python methods

2015-10-11 Thread John Michael Lafayette
Python now has static type checking. All you do is follow function parameters with ": paramType" and add "-> returnType" before the colon at the end of the function declaration and auto-complete will work on the return value in IntelliJ. Can you add the function parameter types and return

Static type checking for public API

2015-10-11 Thread John Michael Lafayette
Python now has static type checking. All you do is follow function parameters with ": paramType" and add "-> returnType" before the colon at the end of the function declaration and auto-complete will work on the return value in IntelliJ. Can you add the function parameter types and return