Skip to content

Commit

Permalink
linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vguptarippling committed Apr 17, 2024
1 parent fca7d70 commit 9211ebb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
4 changes: 1 addition & 3 deletions rippling_cli/cli/commands/login.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from pathlib import Path

import click

from rippling_cli.config.config import save_oauth_token
from rippling_cli.constants import CODE_CHALLENGE_METHOD, DEFAULT_CODE_VERIFIER_LENGTH
from rippling_cli.core.oauth_client import OAuthClient
from rippling_cli.core.oauth_pkce import PKCE
from rippling_cli.core.oauth_token import OAuthToken

Expand All @@ -28,6 +26,6 @@ def login(ctx) -> None:
ctx.obj.oauth_token = access_token

save_oauth_token(access_token, token.expires_in)
click.echo(f"Login successful!")
click.echo("Login successful!")
else:
click.echo("OAuth credentials not configured")
8 changes: 4 additions & 4 deletions rippling_cli/cli/main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import sys
from typing import Union

import click
import sys

from rippling_cli.cli.commands.login import login
from rippling_cli.config.config import get_client_id, get_oauth_token_data
from rippling_cli.constants import EXIT_UNKNOWN_EXCEPTION
from rippling_cli.core.oauth_token import OAuthToken
from rippling_cli.core.rippling_context import RipplingContext
from rippling_cli.cli.commands.login import login
from rippling_cli.config.config import get_client_id, get_oauth_token_data


@click.group(context_settings=dict(help_option_names=["-h", "--help"]))
Expand Down Expand Up @@ -57,7 +57,7 @@ def initialize_cli() -> None:
try:
initialize_cli()
cli()
except Exception as e:
except Exception:
exit_code = EXIT_UNKNOWN_EXCEPTION
finally:
sys.exit(exit_code)
2 changes: 1 addition & 1 deletion rippling_cli/config/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
import json
import os

# Store the OAuth credentials in environment variables or a config file
from datetime import datetime, timedelta
Expand Down
10 changes: 5 additions & 5 deletions rippling_cli/core/oauth_token.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import http.server
import socketserver
import threading
from datetime import datetime
from urllib.parse import parse_qs

import click
import http.server
from datetime import datetime
import threading
import socketserver
import requests

from rippling_cli.config.config import get_oauth_token_data
from rippling_cli.constants import RIPPLING_BASE_URL, RIPPLING_API
from rippling_cli.constants import RIPPLING_API, RIPPLING_BASE_URL


class OAuthToken:
Expand Down

0 comments on commit 9211ebb

Please sign in to comment.