Adding type hints to OpenStack (starting with Oslo)
morgan.fainberg at gmail.com
Sat Jan 26 18:18:41 UTC 2019
Honestly, I would wait for this for the U release. We can then go to the
annotation style and if needed update docstrings at the same time. My
concern with pushing this now is a high churn of code that should be
duplicated once we drop PY2 support.
Other than my above concerns the type checking in mypy would be great to
On Sat, Jan 26, 2019, 09:14 Sergey Vilgelm <sergey at vilgelm.info wrote:
> We have lots of doc strings in rst format and many of them already have
> the `@param` and `@type` tags. Does the mypy support this format or we
> should to rewrite doc string and add the `type:` tags just for mypy?
> Sergey Vilgelm
> On Jan 26, 2019, 9:07 AM -0600, Cyril Roelandt <cyril at redhat.com>, wrote:
> Hello Doug,
> On 01/26/19 09:02, Doug Hellmann wrote:
> We're still required to support python 2 through the beginning of the U
> cycle . Is it possible to apply the type hints in a way that allows
> us to maintain that support?
> There are two ways to apply type hints:
> 1) Use a new syntax that only works with Python 3
> 2) Use comments (see my github branch, where comments starting with
> "type:" can be found)
> I used the second approach in order to not break Python 2 compatibility.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openstack-discuss