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

In type_check_only function flush_errors parameter should be optional #4681

Closed
derlih opened this issue Mar 6, 2018 · 3 comments
Closed

Comments

@derlih
Copy link

derlih commented Mar 6, 2018

In PR #4396 flush_errors parameter was added to type_check_only function from main.py:

def type_check_only(sources: List[BuildSource], bin_dir: Optional[str], options: Options, flush_errors: Optional[Callable[[List[str], bool], None]]) -> BuildResult:

But flush_errors parameter doesn't have the default value (I assume it should be None).

@gvanrossum
Copy link
Member

gvanrossum commented Mar 6, 2018 via email

@emmatyping
Copy link
Collaborator

So in realpython/pytest-mypy#6, it seems pytest-mypy broke because of the new argument to type_check_only. pytest-mypy was using an internal undocumented API that we make no stability guarantees on.

Also it is valid to pass None as an argument for flush_errors, so I don't think there is anything that needs to be done in mypy. I think this can be closed.

@gvanrossum
Copy link
Member

I think we should strongly discourage such use of interfaces internal to mypy. The only public APIs are the command line and the mypy.api module.

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

No branches or pull requests

3 participants