Skip to content

Commit 1b7273c

Browse files
authored
Update Ruff config to improve import ordering. (#901)
1 parent 87960ca commit 1b7273c

File tree

54 files changed

+85
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+85
-36
lines changed

backend/src/controller/aws_apig_event_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Optional
44

55
from aws_lambda_typing.events import APIGatewayProxyEventV1
6+
67
from controller.constants import SUPPLIER_SYSTEM_HEADER_NAME
78
from models.errors import UnauthorizedError
89
from utils import dict_utils

backend/src/controller/fhir_controller.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import Optional
99

1010
from aws_lambda_typing.events import APIGatewayProxyEventV1
11+
1112
from controller.aws_apig_event_utils import (
1213
get_path_parameter,
1314
get_supplier_system_header,

backend/src/forwarding_batch_lambda.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from datetime import datetime
88

99
import simplejson as json
10+
1011
from batch.batch_filename_to_events_mapper import BatchFilenameToEventsMapper
1112
from clients import sqs_client
1213
from controller.fhir_batch_controller import (

backend/src/models/fhir_immunization.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Immunization FHIR R4B validator"""
22

33
from fhir.resources.R4B.immunization import Immunization
4+
45
from models.fhir_immunization_post_validators import PostValidators
56
from models.fhir_immunization_pre_validators import PreValidators
67
from models.utils.validation_utils import get_vaccine_type

backend/src/models/utils/generic_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
BundleLink,
1616
)
1717
from fhir.resources.R4B.immunization import Immunization
18-
from models.constants import Constants
1918
from stdnum.verhoeff import validate
2019

20+
from models.constants import Constants
21+
2122

2223
def get_contained_resource(imms: dict, resource: Literal["Patient", "Practitioner", "QuestionnaireResponse"]):
2324
"""Extract and return the requested contained resource from the FHIR Immunization Resource JSON data"""

backend/src/parameter_parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from urllib.parse import parse_qs, quote, urlencode
66

77
from aws_lambda_typing.events import APIGatewayProxyEventV1
8+
89
from clients import redis_client
910
from models.constants import Constants
1011
from models.errors import ParameterException

backend/src/repository/fhir_batch_repository.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import botocore.exceptions
88
import simplejson as json
99
from boto3.dynamodb.conditions import Attr, Key
10+
1011
from clients import logger
1112
from models.errors import (
1213
IdentifierDuplicationError,

backend/src/repository/fhir_repository.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
import simplejson as json
1010
from boto3.dynamodb.conditions import Attr, Key
1111
from botocore.config import Config
12+
from mypy_boto3_dynamodb.service_resource import DynamoDBServiceResource, Table
13+
from responses import logger
14+
1215
from models.errors import (
1316
IdentifierDuplicationError,
1417
ResourceNotFoundError,
@@ -18,8 +21,6 @@
1821
check_identifier_system_value,
1922
get_vaccine_type,
2023
)
21-
from mypy_boto3_dynamodb.service_resource import DynamoDBServiceResource, Table
22-
from responses import logger
2324

2425

2526
def create_table(table_name=None, endpoint_url=None, region_name="eu-west-2"):

backend/src/search_imms_handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from aws_lambda_typing import context as context_
1010
from aws_lambda_typing import events
11+
1112
from constants import GENERIC_SERVER_ERROR_DIAGNOSTICS_MESSAGE, MAX_RESPONSE_SIZE_BYTES
1213
from controller.aws_apig_response_utils import create_response
1314
from controller.fhir_controller import FhirController, make_controller

backend/src/service/fhir_batch_service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from pydantic import ValidationError
2+
13
from models.errors import CustomValidationError, MandatoryError
24
from models.fhir_immunization import ImmunizationValidator
3-
from pydantic import ValidationError
45
from repository.fhir_batch_repository import ImmunizationBatchRepository
56

67
IMMUNIZATION_VALIDATOR = ImmunizationValidator()

0 commit comments

Comments
 (0)