Skip to content

Commit 7c26432

Browse files
committed
refactor: Move settings import statements
1 parent 38fee2b commit 7c26432

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

geoinsight/core/tasks/analytics/create_road_network.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import datetime
22

33
from celery import shared_task
4+
from django.conf import settings
45
from django.contrib.gis.geos import LineString, Point
56

67
from geoinsight.core.models import (
@@ -31,8 +32,6 @@ def __init__(self):
3132

3233
@classmethod
3334
def is_enabled(cls):
34-
from django.conf import settings
35-
3635
return settings.ENABLE_TASK_CREATE_ROAD_NETWORK
3736

3837
def get_input_options(self):

geoinsight/core/tasks/analytics/flood_network_failure.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import math
22

33
from celery import shared_task
4+
from django.conf import settings
45
from django_large_image import tilesource, utilities
56
import numpy
67

@@ -30,8 +31,6 @@ def __init__(self):
3031

3132
@classmethod
3233
def is_enabled(cls):
33-
from django.conf import settings
34-
3534
return settings.ENABLE_TASK_FLOOD_NETWORK_FAILURE
3635

3736
def get_input_options(self):

geoinsight/core/tasks/analytics/flood_simulation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import tempfile
66

77
from celery import shared_task
8+
from django.conf import settings
89
from django.core.files.base import ContentFile
910

1011
from geoinsight.core.models import Chart, Colormap, Dataset, FileItem, LayerStyle, TaskResult
@@ -35,8 +36,6 @@ def __init__(self):
3536

3637
@classmethod
3738
def is_enabled(cls):
38-
from django.conf import settings
39-
4039
return settings.ENABLE_TASK_FLOOD_SIMULATION
4140

4241
def get_input_options(self):

geoinsight/core/tasks/analytics/geoai_segmentation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33

44
from celery import shared_task
5+
from django.conf import settings
56
from django.core.files.base import ContentFile
67
from django_large_image import utilities
78
import large_image
@@ -33,8 +34,6 @@ def __init__(self):
3334

3435
@classmethod
3536
def is_enabled(cls):
36-
from django.conf import settings
37-
3837
return settings.ENABLE_TASK_GEOAI_SEGMENTATION
3938

4039
def get_input_options(self):

geoinsight/core/tasks/analytics/network_recovery.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import random
22

33
from celery import shared_task
4+
from django.conf import settings
45
from django.utils import timezone
56
import networkx as nx
67
import numpy
@@ -43,8 +44,6 @@ def __init__(self):
4344

4445
@classmethod
4546
def is_enabled(cls):
46-
from django.conf import settings
47-
4847
return settings.ENABLE_TASK_NETWORK_RECOVERY
4948

5049
def get_input_options(self):

geoinsight/core/tasks/analytics/tile2net_segmentation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import zipfile
66

77
from celery import shared_task
8+
from django.conf import settings
89
from django.core.files.base import ContentFile
910
from django_large_image import tilesource, utilities
1011

@@ -28,8 +29,6 @@ def __init__(self):
2829

2930
@classmethod
3031
def is_enabled(cls):
31-
from django.conf import settings
32-
3332
return settings.ENABLE_TASK_TILE2NET_SEGMENTATION
3433

3534
def get_input_options(self):

0 commit comments

Comments
 (0)