diff --git a/tasks.py b/tasks.py index 59a9a3a..475e3ed 100644 --- a/tasks.py +++ b/tasks.py @@ -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"): diff --git a/te_schemas/algorithms.py b/te_schemas/algorithms.py index 5881afb..9746dd0 100644 --- a/te_schemas/algorithms.py +++ b/te_schemas/algorithms.py @@ -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 diff --git a/te_schemas/aoi.py b/te_schemas/aoi.py index 417c912..3848f01 100644 --- a/te_schemas/aoi.py +++ b/te_schemas/aoi.py @@ -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__) diff --git a/te_schemas/datafile.py b/te_schemas/datafile.py index d2d6296..8e70290 100644 --- a/te_schemas/datafile.py +++ b/te_schemas/datafile.py @@ -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 diff --git a/te_schemas/error_recode.py b/te_schemas/error_recode.py index af77599..773d316 100644 --- a/te_schemas/error_recode.py +++ b/te_schemas/error_recode.py @@ -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 diff --git a/te_schemas/jobs.py b/te_schemas/jobs.py index 4ce3366..97c824a 100644 --- a/te_schemas/jobs.py +++ b/te_schemas/jobs.py @@ -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): diff --git a/te_schemas/land_cover.py b/te_schemas/land_cover.py index 2a5fa97..c0fbe68 100644 --- a/te_schemas/land_cover.py +++ b/te_schemas/land_cover.py @@ -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 diff --git a/te_schemas/reporting.py b/te_schemas/reporting.py index 90d68b4..f3024d0 100644 --- a/te_schemas/reporting.py +++ b/te_schemas/reporting.py @@ -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 diff --git a/te_schemas/results.py b/te_schemas/results.py index aaa0391..183d279 100644 --- a/te_schemas/results.py +++ b/te_schemas/results.py @@ -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 diff --git a/te_schemas/schemas.py b/te_schemas/schemas.py index 4f7d23a..a0b7e40 100644 --- a/te_schemas/schemas.py +++ b/te_schemas/schemas.py @@ -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 diff --git a/tests/test_results.py b/tests/test_results.py index 0a2f1ff..b8edc9f 100644 --- a/tests/test_results.py +++ b/tests/test_results.py @@ -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"})