8000 Fix dmypy run when no target given by emmatyping · Pull Request #6153 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Fix dmypy run when no target given #6153

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

Merged
merged 8 commits into from
Jan 8, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make more backwards compatible
  • Loading branch information
emmatyping committed Jan 7, 2019
commit 32dd04fa220c978ea4dade1843505c28c93afdd4
6 changes: 4 additions & 2 deletions mypy/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

MYPY = False
if MYPY:
from typing import Type
from typing import Type, ContextManager
from typing_extensions import Final
else:
ContextManager = object

T = TypeVar('T')

Expand Down Expand Up @@ -262,7 +264,7 @@ def hard_exit(status: int = 0) -> None:
# The following is a backport of stream redirect utilities from Lib/contextlib.py


class _RedirectStream(contextlib.AbstractContextManager):
class _RedirectStream(ContextManager):

_stream = None # type: str

Expand Down
0