Skip to content

Commit

Permalink
Ruff fixes and format
Browse files Browse the repository at this point in the history
  • Loading branch information
jontyms committed Jul 18, 2024
1 parent 3125790 commit 5580754
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 17 deletions.
3 changes: 0 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import json
import logging
import uuid
from typing import Optional
from urllib.parse import urlparse

import requests

# FastAPI
from fastapi import Cookie, Depends, FastAPI, Request, Response, status
from fastapi.responses import FileResponse, RedirectResponse
Expand Down
1 change: 0 additions & 1 deletion app/migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from sqlalchemy.engine import Connection
from sqlmodel import SQLModel

from app.models.user import DiscordModel, EthicsFormModel, UserModel
from app.util.settings import Settings

# this is the Alembic Config object, which provides
Expand Down
2 changes: 1 addition & 1 deletion app/routes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from sqlmodel import Session, select

from app.models.info import InfoModel
from app.models.user import PublicContact, UserModel, user_to_dict, user_update_instance
from app.models.user import PublicContact, UserModel, user_update_instance
from app.util.authentication import Authentication
from app.util.database import get_session
from app.util.errors import Errors
Expand Down
10 changes: 2 additions & 8 deletions app/routes/infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
from pathlib import Path
from typing import Optional

from fastapi import APIRouter, Cookie, Depends, HTTPException, Request
from fastapi import APIRouter, Cookie, HTTPException, Request
from fastapi.responses import FileResponse
from fastapi.templating import Jinja2Templates
from sqlmodel import Session, select

from app.models.info import InfoModel
from app.models.user import PublicContact, UserModel
from app.util.approve import Approve
from app.models.user import PublicContact
from app.util.authentication import Authentication
from app.util.database import get_session
from app.util.discord import Discord
from app.util.email import Email
from app.util.errors import Errors
from app.util.settings import Settings

logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion app/util/approve.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import os

from keycloak import KeycloakAdmin
from sqlalchemy.orm import selectinload
Expand Down
4 changes: 2 additions & 2 deletions app/util/database.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Create the database
from alembic import config, script
from alembic import script
from alembic.runtime import migration
from sqlmodel import Session, SQLModel, create_engine
from sqlmodel import Session, create_engine
from sqlmodel.pool import StaticPool

from app.util.settings import Settings
Expand Down
1 change: 0 additions & 1 deletion app/util/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pathlib
import re
import subprocess
from gc import enable
from typing import Optional

import yaml
Expand Down

0 comments on commit 5580754

Please sign in to comment.