Add flag prohibiting annotation by Any resulting from an unanalyzed module

Open
#3,205 5 comments 0 reactions 1 assignee View on GitHub

@ddfisher is already working on this.

Since May 18, 2017.

Assessment

This issue has not been assessed yet.

Description

feature

example code, in py2.7

import MyType from unanalyzed

def foo(bar):
  # type: (MyType) -> None
  ...

I would expect this to be an error: if mypy doesn't know what MyType is, it shouldn't be a valid type. Instead, it assumes it's Any which is way more permissive behavior than I expect.

Dominant language
Python
Stars
20.6k
Forks
3.3k
Avg merge
1d 18h
Merged PRs (30d)
54

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/mypy

All issues in python/mypy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.