from ._compat import PY2 as PY2, filename_to_ui as filename_to_ui, get_text_stderr as get_text_stderr
from .utils import echo as echo
from typing import Any, Optional

class ClickException(Exception):
    exit_code: int = ...
    message: Any = ...
    def __init__(self, message: Any) -> None: ...
    def format_message(self): ...
    def show(self, file: Optional[Any] = ...) -> None: ...

class UsageError(ClickException):
    exit_code: int = ...
    ctx: Any = ...
    def __init__(self, message: Any, ctx: Optional[Any] = ...) -> None: ...
    def show(self, file: Optional[Any] = ...) -> None: ...

class BadParameter(UsageError):
    param: Any = ...
    param_hint: Any = ...
    def __init__(self, message: Any, ctx: Optional[Any] = ..., param: Optional[Any] = ..., param_hint: Optional[Any] = ...) -> None: ...
    def format_message(self): ...

class MissingParameter(BadParameter):
    param_type: Any = ...
    def __init__(self, message: Optional[Any] = ..., ctx: Optional[Any] = ..., param: Optional[Any] = ..., param_hint: Optional[Any] = ..., param_type: Optional[Any] = ...) -> None: ...
    def format_message(self): ...

class NoSuchOption(UsageError):
    option_name: Any = ...
    possibilities: Any = ...
    def __init__(self, option_name: Any, message: Optional[Any] = ..., possibilities: Optional[Any] = ..., ctx: Optional[Any] = ...) -> None: ...
    def format_message(self): ...

class BadOptionUsage(UsageError):
    def __init__(self, message: Any, ctx: Optional[Any] = ...) -> None: ...

class BadArgumentUsage(UsageError):
    def __init__(self, message: Any, ctx: Optional[Any] = ...) -> None: ...

class FileError(ClickException):
    ui_filename: Any = ...
    filename: Any = ...
    def __init__(self, filename: Any, hint: Optional[Any] = ...) -> None: ...
    def format_message(self): ...

class Abort(RuntimeError): ...
