From c921d62e6c6c759081564b85fc0b77e084b43686 Mon Sep 17 00:00:00 2001 From: eggplants Date: Sat, 5 Feb 2022 04:35:59 +0900 Subject: [PATCH] fix: revert https://stackoverflow.com/a/64477857 makes cli unusable --- waybackpy/cli.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/waybackpy/cli.py b/waybackpy/cli.py index 8f1a6dd..4bc3370 100644 --- a/waybackpy/cli.py +++ b/waybackpy/cli.py @@ -16,6 +16,7 @@ from .utils import DEFAULT_USER_AGENT from .wrapper import Url +@click.command() @click.option( "-u", "--url", help="URL on which Wayback machine operations are to be performed." ) @@ -171,7 +172,7 @@ from .wrapper import Url + "if this parameter is not used then the plain text response of the CDX API " + "will be printed.", ) -def _main( +def main( # pylint: disable=no-value-for-parameter url: Optional[str], user_agent: str, version: bool, @@ -405,9 +406,5 @@ def _main( click.echo(output_string) -def main() -> None: - click.command()(_main) - - if __name__ == "__main__": main()