Skip to content

Commit

Permalink
fix: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
collinlokken committed Jan 6, 2025
1 parent 6e518e4 commit e81133c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions api/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def create_app() -> FastAPI:
if config.APPINSIGHTS_CONSTRING:
from azure.monitor.opentelemetry import configure_azure_monitor
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor

configure_azure_monitor(connection_string=config.APPINSIGHTS_CONSTRING, logger_name="API")
FastAPIInstrumentor.instrument_app(app, excluded_urls="healthcheck")

Expand Down
1 change: 0 additions & 1 deletion api/src/common/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from enum import Enum
from typing import Any

from fastapi import HTTPException
from pydantic import BaseModel
from starlette import status as request_status

Expand Down
3 changes: 2 additions & 1 deletion api/src/common/telemetry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from opentelemetry import trace

# Creates a tracer from the global tracer provider
tracer = trace.get_tracer("tracer.global")
tracer = trace.get_tracer("tracer.global")
3 changes: 1 addition & 2 deletions api/src/features/todo/todo_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from authentication.authentication import auth_with_jwt
from authentication.models import User
from common.exception_handlers import ExceptionHandlingRoute
from features.todo.repository.todo_repository import get_todo_repository
from features.todo.repository.todo_repository_interface import TodoRepositoryInterface
from features.todo.use_cases.add_todo import (
Expand All @@ -24,8 +25,6 @@
update_todo_use_case,
)

from common.exception_handlers import ExceptionHandlingRoute

router = APIRouter(tags=["todos"], prefix="/todos", route_class=ExceptionHandlingRoute)


Expand Down
3 changes: 1 addition & 2 deletions api/src/tests/integration/mock_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

from authentication.authentication import oauth2_scheme
from authentication.models import User
from config import config, default_user

from common.exceptions import UnauthorizedException
from config import config, default_user


def get_mock_rsa_private_key() -> str:
Expand Down

0 comments on commit e81133c

Please sign in to comment.