Skip to content

Commit e4d8463

Browse files
committed
fix linting errors
1 parent f442040 commit e4d8463

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

planet/subscription_request.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ def build_request(name: str,
118118
# Because source is a Mapping we must make copies for
119119
# the function's return value. dict() shallow copies a Mapping
120120
# and returns a new dict.
121-
details = {
122-
"name": name, "source": dict(source)
123-
}
121+
details = {"name": name, "source": dict(source)}
124122

125123
if delivery:
126124
details['delivery'] = dict(delivery)
@@ -761,7 +759,8 @@ def sentinel_hub(collection_id: Optional[str]) -> dict:
761759
Parameters:
762760
collection_id: Sentinel Hub collection
763761
"""
762+
764763
parameters = {}
765764
if collection_id:
766765
parameters['collection_id'] = collection_id
767-
return _hosting("sentinel_hub", parameters)
766+
return _hosting("sentinel_hub", parameters)

tests/integration/test_subscriptions_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def test_subscriptions_create_failure(invoke):
9393
# It must be updated when we begin to test against a more strict
9494
# imitation of the Planet Subscriptions API.
9595
GOOD_SUB_REQUEST = {'name': 'lol', 'delivery': True, 'source': 'wut'}
96-
GOOD_SUB_REQUEST_WITH_HOSTING = {'name': 'lol', 'source': 'wut', 'hosting': True}
96+
GOOD_SUB_REQUEST_WITH_HOSTING = {
97+
'name': 'lol', 'source': 'wut', 'hosting': True
98+
}
9799

98100

99101
@pytest.mark.parametrize('cmd_arg, runner_input',

tests/unit/test_subscription_request.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,7 @@ def test_build_request_host_sentinel_hub_with_collection(geom_geojson):
138138
source=source,
139139
hosting=hosting)
140140

141-
expected = {
142-
"name": "test",
143-
"source": source,
144-
"hosting": hosting
145-
}
141+
expected = {"name": "test", "source": source, "hosting": hosting}
146142

147143
assert res == expected
148144

@@ -160,17 +156,18 @@ def test_build_request_host_sentinel_hub_no_collection(geom_geojson):
160156
}
161157
}
162158

163-
hosting = {"type": "sentinel-hub", "parameters": {"collection_id": "4c9af036-4274-4a97-bf0d-eb2a7853330d"}}
159+
hosting = {
160+
"type": "sentinel-hub",
161+
"parameters": {
162+
"collection_id": "4c9af036-4274-4a97-bf0d-eb2a7853330d"
163+
}
164+
}
164165

165166
res = subscription_request.build_request('test',
166167
source=source,
167168
hosting=hosting)
168169

169-
expected = {
170-
"name": "test",
171-
"source": source,
172-
"hosting": hosting
173-
}
170+
expected = {"name": "test", "source": source, "hosting": hosting}
174171

175172
assert res == expected
176173

0 commit comments

Comments
 (0)