Skip to content

Commit

Permalink
Issue #421 code style cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Sep 20, 2023
1 parent 12f0ecd commit 8156690
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion openeo/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import datetime as dt
import re
from enum import Enum
from typing import Union, Tuple, Any
from typing import Any, Tuple, Union

from openeo.util import rfc3339

Expand Down
2 changes: 1 addition & 1 deletion openeo/rest/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import warnings
from collections import OrderedDict
from pathlib import Path, PurePosixPath
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, Sequence
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Sequence, Tuple, Union

import requests
import shapely.geometry.base
Expand Down
22 changes: 4 additions & 18 deletions openeo/rest/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import typing
import warnings
from builtins import staticmethod
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union, Sequence
from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union

import numpy as np
import shapely.geometry
Expand All @@ -29,29 +29,15 @@
from openeo.internal.jupyter import in_jupyter_context
from openeo.internal.processes.builder import ProcessBuilderBase
from openeo.internal.warnings import UserDeprecationWarning, deprecated, legacy_alias
from openeo.metadata import (
Band,
CollectionMetadata,
)
from openeo.metadata import Band, CollectionMetadata
from openeo.rest import BandMathException, OpenEoClientException, OperatorException
from openeo.rest._datacube import (
THIS,
UDF,
_ProcessGraphAbstraction,
build_child_callback,
)
from openeo.rest._datacube import THIS, UDF, _ProcessGraphAbstraction, build_child_callback
from openeo.rest.job import BatchJob
from openeo.rest.mlmodel import MlModel
from openeo.rest.service import Service
from openeo.rest.udp import RESTUserDefinedProcess
from openeo.rest.vectorcube import VectorCube
from openeo.util import (
dict_no_none,
guess_format,
normalize_crs,
rfc3339,
)

from openeo.util import dict_no_none, guess_format, normalize_crs, rfc3339

if typing.TYPE_CHECKING:
# Imports for type checking only (circular import issue at runtime).
Expand Down
2 changes: 1 addition & 1 deletion openeo/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
from __future__ import annotations

import datetime as dt
from enum import Enum
import functools
import json
import logging
import re
import sys
import time
from collections import OrderedDict
from enum import Enum
from pathlib import Path
from typing import Any, Callable, List, Optional, Tuple, Union
from urllib.parse import urljoin
Expand Down
1 change: 0 additions & 1 deletion tests/rest/datacube/test_datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def test_filter_temporal_extent_single_date_string(s2cube: DataCube, extent, exp
assert graph["arguments"]["extent"] == expected



@pytest.mark.parametrize(
"extent,expected",
[
Expand Down
7 changes: 1 addition & 6 deletions tests/test_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@

import pytest

from openeo.dates import (
get_temporal_extent,
_convert_abbreviated_date,
_type_of_date_string,
_TypeOfDateString,
)
from openeo.dates import _convert_abbreviated_date, _type_of_date_string, _TypeOfDateString, get_temporal_extent


class TestGetTemporalExtent:
Expand Down

0 comments on commit 8156690

Please sign in to comment.