From 28948bccda6128d6f64a99905bdcb8aef533d7f4 Mon Sep 17 00:00:00 2001 From: ahdamin Date: Tue, 8 Oct 2024 15:46:14 +0200 Subject: [PATCH] Organize formats --- genotype_api/database/filters/sample_filters.py | 4 ++-- genotype_api/services/endpoint_services/sample_service.py | 6 +----- genotype_api/services/endpoint_services/user_service.py | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/genotype_api/database/filters/sample_filters.py b/genotype_api/database/filters/sample_filters.py index 90ef3c3..0f8890a 100644 --- a/genotype_api/database/filters/sample_filters.py +++ b/genotype_api/database/filters/sample_filters.py @@ -2,11 +2,11 @@ from enum import Enum from typing import Callable -from sqlalchemy.orm import joinedload + from sqlalchemy import func from sqlalchemy.orm import Query -from genotype_api.database.models import Sample, Analysis +from genotype_api.database.models import Analysis, Sample def filter_samples_by_id(sample_id: str, samples: Query, **kwargs) -> Query: diff --git a/genotype_api/services/endpoint_services/sample_service.py b/genotype_api/services/endpoint_services/sample_service.py index 025c350..5ceda9e 100644 --- a/genotype_api/services/endpoint_services/sample_service.py +++ b/genotype_api/services/endpoint_services/sample_service.py @@ -11,11 +11,7 @@ from genotype_api.database.models import Analysis, Sample from genotype_api.dto.genotype import GenotypeResponse from genotype_api.dto.sample import AnalysisOnSample, SampleCreate, SampleResponse -from genotype_api.exceptions import ( - GenotypeDBError, - InsufficientAnalysesError, - SampleNotFoundError, -) +from genotype_api.exceptions import SampleNotFoundError from genotype_api.models import MatchResult, SampleDetail from genotype_api.services.endpoint_services.base_service import BaseService from genotype_api.services.match_genotype_service.match_genotype import ( diff --git a/genotype_api/services/endpoint_services/user_service.py b/genotype_api/services/endpoint_services/user_service.py index 36d62e6..65bff1d 100644 --- a/genotype_api/services/endpoint_services/user_service.py +++ b/genotype_api/services/endpoint_services/user_service.py @@ -3,7 +3,6 @@ from pydantic import EmailStr from genotype_api.database.models import User -from genotype_api.database.store import Store from genotype_api.dto.user import PlateOnUser, UserRequest, UserResponse from genotype_api.exceptions import UserArchiveError, UserExistsError, UserNotFoundError from genotype_api.services.endpoint_services.base_service import BaseService