Commit 92e0c825 authored by TheTechRobo's avatar TheTechRobo
Browse files

Get rid of Switch from CLI

Why did I ever think this was worth a dependency?
parent 97733f38
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ None of this is public API!
import asyncio

import click
from switch import Switch

from . import YouTubeResponse

@@ -32,10 +31,9 @@ def youtube(ctx, id: str, format: str) -> int:
    response = asyncio.run(YouTubeResponse.generate(id))
    if response.status == "bad.id":
        raise ValueError("Bad video ID - does not match regex")
    with Switch(format) as case:
        if case("json"):
    if format == "json":
        click.echo(response.json())
        elif case("text"):
    elif format == "text":
        click.echo(str(response).strip())
    else:
        raise AssertionError("This should never occur!")