Skip to content

Commit

Permalink
feat: run ruff check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrvlh committed Nov 3, 2024
1 parent e64ec71 commit 9848494
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 68 deletions.
4 changes: 1 addition & 3 deletions examples/facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.facebook import FacebookSSO

Expand Down
5 changes: 2 additions & 3 deletions examples/fitbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.fitbit import FitbitSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
8 changes: 4 additions & 4 deletions examples/generic.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""This is an example usage of litestar-sso."""

import uvicorn
from typing import Any, Dict, Union

import uvicorn
from httpx import AsyncClient
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get
from litestar.exceptions import HTTPException

from litestar_sso.sso.base import DiscoveryDocument, OpenID
from litestar_sso.sso.generic import create_provider

Expand Down
5 changes: 2 additions & 3 deletions examples/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.github import GithubSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.gitlab import GitlabSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.google import GoogleSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/kakao.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.kakao import KakaoSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.line import LineSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.linkedin import LinkedInSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/microsoft.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.microsoft import MicrosoftSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/naver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.naver import NaverSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/notion.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.notion import NotionSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
6 changes: 3 additions & 3 deletions examples/seznam.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Seznam Login Example"""

import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.seznam import SeznamSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.twitter import TwitterSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
5 changes: 2 additions & 3 deletions examples/yandex.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import os

import uvicorn
from litestar import Litestar
from litestar import Request
from litestar import get
from litestar import Litestar, Request, get

from litestar_sso.sso.yandex import YandexSSO

CLIENT_ID = os.environ["CLIENT_ID"]
Expand Down
3 changes: 0 additions & 3 deletions litestar_sso/sso/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
from litestar.exceptions import HTTPException
from litestar.response import Redirect
from oauthlib.oauth2 import WebApplicationClient
from litestar.exceptions import HTTPException
from litestar import Request
from litestar.response import Redirect

from litestar_sso.pkce import get_pkce_challenge_pair
from litestar_sso.state import generate_random_state
Expand Down
23 changes: 12 additions & 11 deletions tests/test_openid_responses.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
from typing import Any, Dict, Tuple, Type

import pytest
from litestar_sso.sso.base import OpenID, SSOBase
from typing import Dict, Type, Tuple, Any

from litestar_sso.sso.twitter import TwitterSSO
from litestar_sso.sso.base import OpenID, SSOBase
from litestar_sso.sso.facebook import FacebookSSO
from litestar_sso.sso.fitbit import FitbitSSO
from litestar_sso.sso.github import GithubSSO
from litestar_sso.sso.gitlab import GitlabSSO
from litestar_sso.sso.kakao import KakaoSSO
from litestar_sso.sso.line import LineSSO
from litestar_sso.sso.linkedin import LinkedInSSO
from litestar_sso.sso.microsoft import MicrosoftSSO
from litestar_sso.sso.naver import NaverSSO
from litestar_sso.sso.spotify import SpotifySSO
from litestar_sso.sso.microsoft import MicrosoftSSO
from litestar_sso.sso.linkedin import LinkedInSSO
from litestar_sso.sso.line import LineSSO
from litestar_sso.sso.kakao import KakaoSSO
from litestar_sso.sso.gitlab import GitlabSSO
from litestar_sso.sso.github import GithubSSO
from litestar_sso.sso.fitbit import FitbitSSO
from litestar_sso.sso.facebook import FacebookSSO
from litestar_sso.sso.twitter import TwitterSSO
from litestar_sso.sso.yandex import YandexSSO

sso_test_cases: Tuple[Tuple[Type[SSOBase], Dict[str, Any], OpenID], ...] = (
Expand Down
8 changes: 0 additions & 8 deletions tests/test_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
from litestar_sso.sso.spotify import SpotifySSO
from litestar_sso.sso.twitter import TwitterSSO
from litestar_sso.sso.yandex import YandexSSO
from litestar_sso.sso.microsoft import MicrosoftSSO
from litestar_sso.sso.naver import NaverSSO
from litestar_sso.sso.spotify import SpotifySSO
from litestar_sso.sso.notion import NotionSSO
from litestar_sso.sso.linkedin import LinkedInSSO
from litestar_sso.sso.twitter import TwitterSSO
from litestar_sso.sso.yandex import YandexSSO
from litestar_sso.sso.seznam import SeznamSSO

GenericProvider = create_provider(
name="generic",
Expand Down
1 change: 1 addition & 0 deletions tests/test_providers_individual.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from litestar_sso import NotionSSO, OpenID, SSOLoginError


Expand Down

0 comments on commit 9848494

Please sign in to comment.