8000 futurize script should preserve function annotations with compatible syntax · Issue #3 · PythonCharmers/python-future · GitHub
[go: up one dir, main page]

Skip to content
futurize script should preserve function annotations with compatible syntax #3
Open
@edschofield

Description

@edschofield

Spawned from issue #2.

Running futurize --from3 should convert Python 3 function annotations such as::

def _parse(self, filename: str, dir='.') -> list:
    ...

into the following Python 3 / Python 2 compatible code:

def _parse(self, filename, dir='.'):
    ...
_parse.__annotations__ = {'filename': str, 'return': list}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0