# Path: dev_tools/env_tools.py
# def get_unhidden_ungenerated_python_files(directory: str) -> Iterable[str]:
# def create_virtual_env(venv_path: str,
#                        requirements_paths: Iterable[str],
#                        python_path: str,
#                        verbose: bool) -> None:
# def prepare_temporary_test_environment(
#         destination_directory: str,
#         repository: GithubRepository,
#         pull_request_number: Optional[int],
#         verbose: bool,
#         env_name: str = '.test_virtualenv',
#         python_path: str = '/usr/bin/python3.5',
#         commit_ids_known_callback: Callable[[PreparedEnv], None] = None
# ) -> PreparedEnv:
# 
# Path: dev_tools/shell_tools.py
# BOLD = 1
# DIM = 2
# RED = 31
# GREEN = 32
# YELLOW = 33
# def highlight(text: str, color_code: int, bold: bool=False) -> str:
#     def __init__(self, out_pipe: Optional[IO[str]] = None) -> None:
# async def _async_forward(async_chunks: collections.AsyncIterable,
#                          out: Optional[Union[TeeCapture, IO[str]]]
#                          ) -> Optional[str]:
# async def _async_wait_for_process(
#         future_process: Any,
#         out: Optional[Union[TeeCapture, IO[str]]] = sys.stdout,
#         err: Optional[Union[TeeCapture, IO[str]]] = sys.stderr
# ) -> CommandOutput:
# def abbreviate_command_arguments_after_switches(
#         cmd: Tuple[str, ...]) -> Tuple[str, ...]:
# def run_cmd(*cmd: Optional[str],
#             out: Optional[Union[TeeCapture, IO[str]]] = sys.stdout,
#             err: Optional[Union[TeeCapture, IO[str]]] = sys.stderr,
#             raise_on_fail: bool = True,
#             log_run_to_stderr: bool = True,
#             abbreviate_non_option_arguments: bool = False,
#             **kwargs
#             ) -> CommandOutput:
# def run_shell(cmd: str,
#               out: Optional[Union[TeeCapture, IO[str]]] = sys.stdout,
#               err: Optional[Union[TeeCapture, IO[str]]] = sys.stderr,
#               raise_on_fail: bool = True,
#               log_run_to_stderr: bool = True,
#               **kwargs
#               ) -> CommandOutput:
# def output_of(*cmd: Optional[str], **kwargs) -> str:
# class TeeCapture:


from typing import Tuple, Optional, cast, Set
from dev_tools import env_tools, shell_tools
import abc
import os.path
        except Exception as ex:
            result = CheckResult(self, False, 'Unexpected error.', ex)

        print(shell_tools.highlight(
            'Finished ' + self.command_line_switch(),
            shell_tools.GREEN if result.success else shell_tools.RED))
        if verbose:
            print(result)

        return result

    def pick_env_and_run_and_report(self,
                                    env: env_tools.PreparedEnv,
                                    verbose: bool,
                                    previous_failures: Set['Check']
                                    ) -> CheckResult:
        """Evaluates this check in python 3 or 2.7, and reports to github.

        If the prepared environments are not linked to a github repository,
        with a known access token, reporting to github is skipped.

        Args:
            env: A prepared python 3 environment.
            verbose: When set, more progress output is produced.
            previous_failures: Checks that have already run and failed.

        Returns:
            A CheckResult instance.
        """
        env.report_status_to_github('pending', 'Running...', self.context())

# Path: dev_tools/env_tools.py
# def get_unhidden_ungenerated_python_files(directory: str) -> Iterable[str]:
# def create_virtual_env(venv_path: str,
#                        requirements_paths: Iterable[str],
#                        python_path: str,
#                        verbose: bool) -> None:
# def prepare_temporary_test_environment(
#         destination_directory: str,
#         repository: GithubRepository,
#         pull_request_number: Optional[int],
#         verbose: bool,
#         env_name: str = '.test_virtualenv',
#         python_path: str = '/usr/bin/python3.5',
#         commit_ids_known_callback: Callable[[PreparedEnv], None] = None
# ) -> PreparedEnv:
# 
# Path: dev_tools/shell_tools.py
# BOLD = 1
# DIM = 2
# RED = 31
# GREEN = 32
# YELLOW = 33
# def highlight(text: str, color_code: int, bold: bool=False) -> str:
#     def __init__(self, out_pipe: Optional[IO[str]] = None) -> None:
# async def _async_forward(async_chunks: collections.AsyncIterable,
#                          out: Optional[Union[TeeCapture, IO[str]]]
#                          ) -> Optional[str]:
# async def _async_wait_for_process(
#         future_process: Any,
#         out: Optional[Union[TeeCapture, IO[str]]] = sys.stdout,
#         err: Optional[Union[TeeCapture, IO[str]]] = sys.stderr
# ) -> CommandOutput:
# def abbreviate_command_arguments_after_switches(
#         cmd: Tuple[str, ...]) -> Tuple[str, ...]:
# def run_cmd(*cmd: Optional[str],
#             out: Optional[Union[TeeCapture, IO[str]]] = sys.stdout,
#             err: Optional[Union[TeeCapture, IO[str]]] = sys.stderr,
#             raise_on_fail: bool = True,
#             log_run_to_stderr: bool = True,
#             abbreviate_non_option_arguments: bool = False,
#             **kwargs
#             ) -> CommandOutput:
# def run_shell(cmd: str,
#               out: Optional[Union[TeeCapture, IO[str]]] = sys.stdout,
#               err: Optional[Union[TeeCapture, IO[str]]] = sys.stderr,
#               raise_on_fail: bool = True,
#               log_run_to_stderr: bool = True,
#               **kwargs
#               ) -> CommandOutput:
# def output_of(*cmd: Optional[str], **kwargs) -> str:
# class TeeCapture:


# Path: dev_tools/check.py
from typing import Tuple, Optional, cast, Set
from dev_tools import env_tools, shell_tools
import abc
import os.path

        except Exception as ex:
            result = CheckResult(self, False, 'Unexpected error.', ex)

        print(shell_tools.highlight(
            'Finished ' + self.command_line_switch(),
            shell_tools.GREEN if result.success else shell_tools.RED))
        if verbose:
            print(result)

        return result

    def pick_env_and_run_and_report(self,
                                    env: env_tools.PreparedEnv,
                                    verbose: bool,
                                    previous_failures: Set['Check']
                                    ) -> CheckResult:
        """Evaluates this check in python 3 or 2.7, and reports to github.

        If the prepared environments are not linked to a github repository,
        with a known access token, reporting to github is skipped.

        Args:
            env: A prepared python 3 environment.
            verbose: When set, more progress output is produced.
            previous_failures: Checks that have already run and failed.

        Returns:
            A CheckResult instance.
        """
        env.report_status_to_github('pending', 'Running...', self.context())

        chosen_env = cast(env_tools.PreparedEnv, env)