You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Eric Gustavson (Jira)" <ji...@apache.org> on 2020/10/05 21:58:00 UTC

[jira] [Commented] (THRIFT-4181) PEP 484 Type Hinting on generated code

    [ https://issues.apache.org/jira/browse/THRIFT-4181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17208360#comment-17208360 ] 

Eric Gustavson commented on THRIFT-4181:
----------------------------------------

+1 this would be very helpful as a user of generated thrift code

> PEP 484 Type Hinting on generated code
> --------------------------------------
>
>                 Key: THRIFT-4181
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4181
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Python - Compiler
>            Reporter: NEGORO Tetsuya
>            Priority: Minor
>
> Dear maintainers,
> I think it is useful if Thrift Python compiler has option to enable generated code contain type hints proposed in PEP 484.
> https://www.python.org/dev/peps/pep-0484
> Though it does no effect on semantics currently, there are several linting tools use it. It also helps people who work with generated code.
> This syntax is supported by Python 3.5> only, but for versions below we can still use special type comments for annotations.
> https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code
> Thanks



--
This message was sent by Atlassian Jira
(v8.3.4#803005)