Skip to content

Commit

Permalink
Sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
azvoleff committed Aug 2, 2024
1 parent 92010e5 commit 99ca5fc
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 57 deletions.
3 changes: 1 addition & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import sys
from tempfile import mkstemp

from invoke import Collection
from invoke import task
from invoke import Collection, task


def query_yes_no(question, default="yes"):
Expand Down
3 changes: 1 addition & 2 deletions te_schemas/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from dataclasses import field

import marshmallow_dataclass
from marshmallow import EXCLUDE
from marshmallow import pre_load
from marshmallow import EXCLUDE, pre_load

from te_schemas import SchemaBase

Expand Down
3 changes: 1 addition & 2 deletions te_schemas/aoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import logging

from marshmallow_dataclass import dataclass
from osgeo import gdal
from osgeo import ogr
from osgeo import gdal, ogr

logger = logging.getLogger(__name__)

Expand Down
6 changes: 2 additions & 4 deletions te_schemas/datafile.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from typing import List
from typing import Union
from typing import List, Union

import marshmallow_dataclass

from .results import Band
from .results import LocalPath
from .results import Band, LocalPath


@marshmallow_dataclass.dataclass
Expand Down
9 changes: 2 additions & 7 deletions te_schemas/error_recode.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import uuid as uuid_module
from dataclasses import field
from typing import ClassVar
from typing import List
from typing import Optional
from typing import Tuple
from typing import Type
from typing import ClassVar, List, Optional, Tuple, Type

from marshmallow import EXCLUDE
from marshmallow import validate
from marshmallow import EXCLUDE, validate
from marshmallow_dataclass import dataclass


Expand Down
19 changes: 10 additions & 9 deletions te_schemas/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
import uuid

import marshmallow_dataclass
from marshmallow import post_load
from marshmallow import pre_load
from marshmallow import post_load, pre_load

from .algorithms import ExecutionScript
from .results import EmptyResults
from .results import FileResults
from .results import JsonResults
from .results import LocalPath
from .results import RasterResults
from .results import TimeSeriesTableResult
from .results import VectorResults
from .results import (
EmptyResults,
FileResults,
JsonResults,
LocalPath,
RasterResults,
TimeSeriesTableResult,
VectorResults,
)


class ScriptStatus(enum.Enum):
Expand Down
14 changes: 4 additions & 10 deletions te_schemas/land_cover.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
from __future__ import annotations

import math
from dataclasses import field
from dataclasses import fields
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple

from marshmallow import validate
from marshmallow import validates_schema
from dataclasses import field, fields
from typing import Any, Dict, List, Optional, Tuple

from marshmallow import validate, validates_schema
from marshmallow.exceptions import ValidationError
from marshmallow_dataclass import dataclass

Expand Down
8 changes: 2 additions & 6 deletions te_schemas/reporting.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import datetime
from dataclasses import field
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
from typing import Dict, List, Optional, Union

from marshmallow import validate
from marshmallow_dataclass import dataclass

from . import land_cover
from . import schemas
from . import land_cover, schemas
from .error_recode import ErrorRecodePolygons


Expand Down
4 changes: 1 addition & 3 deletions te_schemas/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

import marshmallow
import marshmallow_dataclass
from marshmallow import EXCLUDE
from marshmallow import fields
from marshmallow import validate
from marshmallow import EXCLUDE, fields, validate
from marshmallow.exceptions import ValidationError
from marshmallow_dataclass.typing import Url

Expand Down
4 changes: 1 addition & 3 deletions te_schemas/schemas.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import datetime
import typing

from marshmallow import fields
from marshmallow import post_load
from marshmallow import Schema
from marshmallow import Schema, fields, post_load
from marshmallow_dataclass import dataclass


Expand Down
19 changes: 10 additions & 9 deletions tests/test_results.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
from copy import deepcopy
from pathlib import Path
from pathlib import PurePosixPath
from pathlib import Path, PurePosixPath

import pytest

from te_schemas.results import Band
from te_schemas.results import DataType
from te_schemas.results import Raster
from te_schemas.results import RasterFileType
from te_schemas.results import RasterResults
from te_schemas.results import TiledRaster
from te_schemas.results import URI
from te_schemas.results import (
URI,
Band,
DataType,
Raster,
RasterFileType,
RasterResults,
TiledRaster,
)

dummy_Band = Band(name="dummy band", metadata={"test_metadata_key": "test metadata"})

Expand Down

0 comments on commit 99ca5fc

Please sign in to comment.