Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4181

PEP 484 Type Hinting on generated code

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Python - Compiler
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ngr-t NEGORO Tetsuya
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: