Skip to content

Commit

Permalink
refactor: fix cli help
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhd1701 committed Apr 22, 2022
1 parent 0b6b8a6 commit bef6989
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
10 changes: 7 additions & 3 deletions evernote_backup/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion evernote_backup/evernote_client_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/test_evernote_client_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bef6989

Please sign in to comment.