Function annotation not supported

Bug #1318497 reported by Cody
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pyflakes
New
Undecided
Unassigned

Bug Description

In this code snippet,

def add(x:int, y:int) -> int:
    return x + y

there are function annotations that are only supported after python 3.0

When I execute flake8 for this python code:

$ flake8 foo.py -vv
checking foo.py
def add(x: int, y: int) -> int:
return x + y
7.3.py:1:11: E901 SyntaxError: invalid syntax

Revision history for this message
Florent (florent.x) wrote :

Marked as duplicate.

There's useful information on the README too.

tl;dr; install pyflakes/flake8 on Python 3

:-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.