Skip to content

Commit

Permalink
correct flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
michael7nightingale committed Aug 9, 2023
1 parent 4011799 commit cc660f9
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/apps/cabinets/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from uuid import uuid4

from tortoise import fields

from src.base.models import TortoiseModel
Expand Down
2 changes: 1 addition & 1 deletion src/apps/users/api_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from .dependencies import get_oauth_provider
from .models import User
from .oauth import GoogleOAuthProvider, GithubOAuthProvider, Providers
from .oauth import Providers
from .schemas import UserRegister, UserCustomModel
from src.core.config import get_app_settings
from src.services.token import confirm_token, generate_activation_link
Expand Down
2 changes: 1 addition & 1 deletion src/apps/users/dependencies.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fastapi import Form, Path
from fastapi import Form

from .oauth import Providers, get_provider, BaseProvider
from .schemas import UserRegister
Expand Down
2 changes: 1 addition & 1 deletion src/apps/users/oauth/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class GithubOAuthProvider(BaseProvider):
name = "github"

def get_access_token(self) -> str | None:
url = "https://github.com/login/oauth/access_token?client_id={client_id}&client_secret={client_secret}&code={code}".format(
url = "https://github.com/login/oauth/access_token?client_id={client_id}&client_secret={client_secret}&code={code}".format( # noqa: E501
client_secret=self.client_secret,
client_id=self.client_id,
code=self.code
Expand Down
3 changes: 1 addition & 2 deletions src/apps/users/routes.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from fastapi import APIRouter, Form, Request, Depends
from fastapi.templating import Jinja2Templates
from fastapi.responses import RedirectResponse
import requests
from tortoise.exceptions import IntegrityError

from .dependencies import get_user_register_data, get_oauth_provider
from .models import User
from .oauth import GithubOAuthProvider, GoogleOAuthProvider, Providers
from .oauth import Providers
from .schemas import UserRegister, UserCustomModel
from src.core.config import get_app_settings
from src.services.token import confirm_token, generate_activation_link
Expand Down
2 changes: 1 addition & 1 deletion src/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def github_login_url(self) -> str:

@property
def google_login_url(self) -> str:
return "{token_request_uri}?response_type={response_type}&client_id={client_id}&redirect_uri={redirect_uri}&scope={scope}".format(
return "{token_request_uri}?response_type={response_type}&client_id={client_id}&redirect_uri={redirect_uri}&scope={scope}".format( # noqa: E501
token_request_uri="https://accounts.google.com/o/oauth2/auth",
response_type="code",
client_id=self.GOOGLE_CLIENT_ID,
Expand Down
1 change: 0 additions & 1 deletion src/services/email.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from smtplib import SMTP_SSL
from src.core.config import get_app_settings


class SMTPServer(SMTP_SSL):
Expand Down

0 comments on commit cc660f9

Please sign in to comment.