Only use click for secho, echo, style

This commit is contained in:
nathom 2021-07-30 11:24:09 -07:00
parent 9970ac548f
commit 286ff502b5
8 changed files with 129 additions and 129 deletions

View file

@ -50,7 +50,7 @@ class NonStreamable(Exception):
:param item:
"""
click.echo(self.print_msg(item))
echo(self.print_msg(item))
def print_msg(self, item) -> str:
"""Return a generic readable message.
@ -59,12 +59,12 @@ class NonStreamable(Exception):
:type item: Media
:rtype: str
"""
base_msg = [click.style(f"Unable to stream {item!s}.", fg="yellow")]
base_msg = [style(f"Unable to stream {item!s}.", fg="yellow")]
if self.message:
base_msg.extend(
(
click.style("Message:", fg="yellow"),
click.style(self.message, fg="red"),
style("Message:", fg="yellow"),
style(self.message, fg="red"),
)
)