KEMBAR78
Add "--use-stdin" · Issue #3553 · python/mypy · GitHub
Skip to content

Add "--use-stdin"  #3553

@refi64

Description

@refi64

Right now I'm trying to add mypy support to Howl, and it's been...interesting, to say the least!

The main obstacle I've run into is what to do with files that haven't been saved yet. Right now, I'm writing unsaved files to a temporary file (say /tmp/foo.py) and then running mypy on the temporary, but this falls apart when using relative imports.

I think I have a simple solution, though: --use-stdin. This would work like so:

$ echo the_unwritten_contents | mypy --use-stdin x.py

Mypy will use the contents of sys.stdin for x.py. And...that's all. It's like running mypy on an actual file, but using different contents for it.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions