From 4b2e2575200503e84fb0a998423db59f29df3349 Mon Sep 17 00:00:00 2001 From: Yashar Robert Date: Fri, 7 Jun 2024 23:07:48 +0200 Subject: [PATCH] Fix isort problems --- src/dso_api/dbroles.py | 2 +- src/dso_api/dynamic_api/temporal.py | 2 +- src/dso_api/router.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dso_api/dbroles.py b/src/dso_api/dbroles.py index f07a7b326..0ab4493e3 100644 --- a/src/dso_api/dbroles.py +++ b/src/dso_api/dbroles.py @@ -20,9 +20,9 @@ from __future__ import annotations import logging +import re from typing import Optional from urllib.parse import urlparse -import re from asgiref.local import Local from django.conf import settings diff --git a/src/dso_api/dynamic_api/temporal.py b/src/dso_api/dynamic_api/temporal.py index dcf654588..a557e4890 100644 --- a/src/dso_api/dynamic_api/temporal.py +++ b/src/dso_api/dynamic_api/temporal.py @@ -15,9 +15,9 @@ from more_itertools import first from rest_framework.exceptions import ValidationError from rest_framework.request import Request +from schematools.naming import to_snake_case from schematools.permissions import UserScopes from schematools.types import DatasetTableSchema, TemporalDimensionFields -from schematools.naming import to_snake_case from dso_api.dynamic_api.permissions import check_filter_field_access diff --git a/src/dso_api/router.py b/src/dso_api/router.py index c5e79b0e6..24f8591da 100644 --- a/src/dso_api/router.py +++ b/src/dso_api/router.py @@ -2,6 +2,7 @@ # Route all write requests to the default database import random + import environ from django.conf import settings @@ -27,7 +28,7 @@ def db_for_read(self, model, **hints): When multple replica databases are available, choose one at random """ if len(replicas) > 1: - return random.choice(replicas) + return random.choice(replicas) # nosec: B311 return "replica_1" def db_for_write(self, model, **hints):