Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential warning about mis-placed type annotation? #1155

Closed
mihneagiurgea opened this issue Jan 25, 2016 · 1 comment
Closed

Potential warning about mis-placed type annotation? #1155

mihneagiurgea opened this issue Jan 25, 2016 · 1 comment

Comments

@mihneagiurgea
Copy link

I can imagine the following scenario becoming confusing & potentially common

def correctly_annotated(x):
  # type: (int) -> int
  """docs..."""
  ...

def incorrectly_annotated(x):
  """docs..."""
  # type: (int) -> int
  ...

It might be useful for mypy to at least print a warning about the 2nd case?

@ddfisher ddfisher added this to the Future milestone Mar 1, 2016
@gvanrossum gvanrossum removed this from the Future milestone Mar 29, 2017
@ilevkivskyi
Copy link
Member

This is now fixed by typed_ast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants