From bef69897aee605acffc722bb27fff43fde79d379 Mon Sep 17 00:00:00 2001 From: vzhd1701 Date: Fri, 22 Apr 2022 11:57:03 +0500 Subject: [PATCH] refactor: fix cli help --- evernote_backup/cli.py | 10 +++++++--- evernote_backup/evernote_client_oauth.py | 4 +++- tests/test_evernote_client_oauth.py | 4 +++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/evernote_backup/cli.py b/evernote_backup/cli.py index 2fc1faa..fa933d0 100644 --- a/evernote_backup/cli.py +++ b/evernote_backup/cli.py @@ -55,7 +55,7 @@ "--oauth-host", default=config_defaults.OAUTH_HOST, show_default=True, - help="Oauth host. (Advanced option, use with --oauth.)" + help="OAuth local server host. (Advanced option, use with --oauth.)", ) opt_token = click.option( @@ -124,7 +124,9 @@ def cli(quiet: bool, verbose: bool) -> None: @cli.command() @opt_database -@group_options(opt_user, opt_password, opt_oauth, opt_oauth_port, opt_oauth_host, opt_token) +@group_options( + opt_user, opt_password, opt_oauth, opt_oauth_port, opt_oauth_host, opt_token +) @click.option( "--force", is_flag=True, @@ -262,7 +264,9 @@ def export( @cli.command() @opt_database -@group_options(opt_user, opt_password, opt_oauth, opt_oauth_port, opt_oauth_host, opt_token) +@group_options( + opt_user, opt_password, opt_oauth, opt_oauth_port, opt_oauth_host, opt_token +) @opt_network_retry_count def reauth( database: str, diff --git a/evernote_backup/evernote_client_oauth.py b/evernote_backup/evernote_client_oauth.py index 83b11e0..c1f8baa 100644 --- a/evernote_backup/evernote_client_oauth.py +++ b/evernote_backup/evernote_client_oauth.py @@ -55,7 +55,9 @@ def run(self) -> None: class EvernoteOAuthCallbackHandler(object): - def __init__(self, oauth_client: "EvernoteOAuthClient", oauth_port: int, server_host: str) -> None: + def __init__( + self, oauth_client: "EvernoteOAuthClient", oauth_port: int, server_host: str + ) -> None: self.client = oauth_client self.server_host = server_host diff --git a/tests/test_evernote_client_oauth.py b/tests/test_evernote_client_oauth.py index e7a9f9a..afbba8a 100644 --- a/tests/test_evernote_client_oauth.py +++ b/tests/test_evernote_client_oauth.py @@ -42,7 +42,9 @@ def test_server_no_docker( oauth_handler.wait_for_token() - mock_oauth_http_server.assert_any_call((FAKE_OAUTH_HOST, FAKE_OAUTH_PORT), mocker.ANY) + mock_oauth_http_server.assert_any_call( + (FAKE_OAUTH_HOST, FAKE_OAUTH_PORT), mocker.ANY + ) def test_server_yes_docker(