Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
meomancer committed Oct 18, 2024
1 parent fb1e973 commit 950d346
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
5 changes: 3 additions & 2 deletions django_project/gap/tests/ingestor/test_wind_borne_sistems.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
from core.settings.utils import absolute_path
from gap.ingestor.exceptions import EnvIsNotSetException
from gap.ingestor.wind_borne_systems import (
WindBorneSystemsAPI, USERNAME_ENV_NAME, PASSWORD_ENV_NAME, PROVIDER,
STATION_TYPE
WindBorneSystemsAPI,
USERNAME_ENV_NAME, PASSWORD_ENV_NAME,
PROVIDER, STATION_TYPE
)
from gap.models import (
Provider, StationType, Country, Station, IngestorSession,
Expand Down
14 changes: 7 additions & 7 deletions django_project/gap_api/api_views/measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def get_response_data(self) -> Response:
da.dataset, [da], location, start_dt, end_dt,
altitudes=(min_altitudes, max_altitudes),
)
except TypeError as e:
except TypeError:
pass

response = None
Expand Down Expand Up @@ -445,8 +445,8 @@ def get_response_data(self) -> Response:
@swagger_auto_schema(
operation_id='get-measurement',
operation_description=(
"Fetch weather data using either a single point or bounding box "
"and attribute filters."
"Fetch weather data using either a single point or bounding box "
"and attribute filters."
),
tags=[ApiTag.Measurement],
manual_parameters=[
Expand Down Expand Up @@ -490,23 +490,23 @@ def get(self, request, *args, **kwargs):
@swagger_auto_schema(
operation_id='get-measurement-by-geom',
operation_description=(
"Fetch weather data using either a polygon or list of point "
"and attribute filters."
"Fetch weather data using either a polygon or list of point "
"and attribute filters."
),
tags=[ApiTag.Measurement],
manual_parameters=[
*api_parameters
],
request_body=openapi.Schema(
description=(
'MultiPolygon or MultiPoint (SRID 4326) in geojson format'
'MultiPolygon or MultiPoint (SRID 4326) in geojson format'
),
type=openapi.TYPE_STRING
),
responses={
200: openapi.Schema(
description=(
'Weather data'
'Weather data'
),
type=openapi.TYPE_OBJECT,
properties={}
Expand Down
6 changes: 4 additions & 2 deletions django_project/gap_api/tests/test_measurement_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
MeasurementFactory
)
from gap.models import DatasetAttribute, Dataset
from gap.utils.reader import DatasetReaderValue, DatasetTimelineValue, \
DatasetReaderInput, DatasetReaderOutputType, BaseDatasetReader, \
from gap.utils.reader import (
DatasetReaderValue, DatasetTimelineValue,
DatasetReaderInput, DatasetReaderOutputType, BaseDatasetReader,
LocationInputType
)
from gap_api.api_views.measurement import MeasurementAPI


Expand Down

0 comments on commit 950d346

Please sign in to comment.