Skip to content

Commit

Permalink
Standardise mapit.MapIt Python imports
Browse files Browse the repository at this point in the history
  • Loading branch information
zarino committed Sep 24, 2024
1 parent 81811fc commit 1de02a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hub/management/commands/import_areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tqdm import tqdm

from hub.models import Area, AreaType
from utils import mapit
from utils.mapit import MapIt


class Command(BaseCommand):
Expand Down Expand Up @@ -58,7 +58,7 @@ def add_arguments(self, parser):
)

def handle(self, quiet: bool = False, diagnostics: bool = False, *args, **options):
mapit_client = mapit.MapIt()
mapit_client = MapIt()
for b_type in self.boundary_types:
areas = mapit_client.areas_of_type(b_type["mapit_type"], generation=b_type["mapit_generation"])
if diagnostics:
Expand Down
4 changes: 2 additions & 2 deletions hub/management/commands/import_council_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pandas as pd

from hub.models import DataSet
from utils import mapit
from utils.mapit import MapIt

from .base_importers import BaseImportFromDataFrameCommand, MultipleAreaTypesMixin

Expand Down Expand Up @@ -101,7 +101,7 @@ class Command(MultipleAreaTypesMixin, BaseImportFromDataFrameCommand):
}

def get_dataframe(self):
mapit_client = mapit.MapIt()
mapit_client = MapIt()
areas = mapit_client.areas_of_type(
self.mapit_types[self.area_type]["mapit_type"],
generation=self.mapit_types[self.area_type]["mapit_generation"]
Expand Down

0 comments on commit 1de02a9

Please sign in to comment.