Skip to content

Make import of Type check-time only. #2669

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 3 commits into from
Jan 10, 2017
Merged
Changes from all commits
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
7 changes: 4 additions & 3 deletions mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import time

from typing import Any, Dict, List, Mapping, Optional, Set, Tuple, Type, cast
from typing import Any, Dict, List, Mapping, Optional, Set, Tuple, cast

from mypy import build
from mypy import defaults
Expand Down Expand Up @@ -128,8 +128,9 @@ def process_options(args: List[str],
"""Parse command line arguments."""

# Make the help output a little less jarring.
help_factory = cast(Type[argparse.HelpFormatter], (lambda prog:
argparse.RawDescriptionHelpFormatter(prog=prog, max_help_position=28)))
help_factory = (lambda prog:
argparse.RawDescriptionHelpFormatter(prog=prog,
max_help_position=28)) # type: Any
parser = argparse.ArgumentParser(prog='mypy', epilog=FOOTER,
fromfile_prefix_chars='@',
formatter_class=help_factory)
Expand Down