# Path: valohai_cli/messages.py
# def warn(message: str, err: bool = True) -> None:
#     click.echo(_format_message(message, WARN_EMOJI, 'Warning:', 'yellow'), err=err)


import sys
import click
import requests
import valohai_cli
from typing import Optional
from valohai_cli.messages import warn
        from distutils.version import LooseVersion




@click.command()
def update_check() -> None:
    data = get_pypi_info()
    current_version = valohai_cli.__version__
    latest_version = data['info']['version']
    click.echo('Your version of Valohai-CLI is ' + click.style(current_version, bold=True))
    click.echo(' The latest release on PyPI is ' + click.style(latest_version, bold=True))
    upgrade_status = determine_upgrade_status(current_version, latest_version)

    if upgrade_status == 'upgrade':
        click.secho(
            '\nGood news! An upgrade is available!\n'

# Path: valohai_cli/messages.py
# def warn(message: str, err: bool = True) -> None:
#     click.echo(_format_message(message, WARN_EMOJI, 'Warning:', 'yellow'), err=err)


# Path: valohai_cli/commands/update_check.py
import sys
import click
import requests
import valohai_cli
from typing import Optional
from valohai_cli.messages import warn
        from distutils.version import LooseVersion





@click.command()
def update_check() -> None:
    data = get_pypi_info()
    current_version = valohai_cli.__version__
    latest_version = data['info']['version']
    click.echo('Your version of Valohai-CLI is ' + click.style(current_version, bold=True))
    click.echo(' The latest release on PyPI is ' + click.style(latest_version, bold=True))
    upgrade_status = determine_upgrade_status(current_version, latest_version)

    if upgrade_status == 'upgrade':
        click.secho(
            '\nGood news! An upgrade is available!\n'

            'Run (e.g.) `pip install -U valohai-cli` to install the new version.',