Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Dec 14, 2023
1 parent d76eaeb commit d978cc9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/integration/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def test_message_api():
r = SESSION.get(url).json()
# get links from 2nd message
links = r['features'][1]['links']

# check link contains rel='http://def.wmo.int/def/rel/wnm/-/update'
assert any(link['rel'] == 'http://def.wmo.int/def/rel/wnm/-/update' for link in links) # noqa

Expand Down
4 changes: 2 additions & 2 deletions wis2box-management/wis2box/data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ def publish_item(self, identifier, item) -> bool:
LOGGER.debug('Publishing data')
data_bytes = self.as_bytes(the_data)
storage_path = f'{STORAGE_SOURCE}/{STORAGE_PUBLIC}/{rfp}/{identifier}.{format_}' # noqa
is_update = False

is_update = False
is_new = True
# check if storage_path already exists
if exists(storage_path):
Expand Down
1 change: 1 addition & 0 deletions wis2box-management/wis2box/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def exists(path: str) -> bool:
LOGGER.debug(f'Checking if {identifier} exists')
return storage.exists(identifier)


def get_data(path: str) -> Any:
"""
Get data from storage
Expand Down
2 changes: 1 addition & 1 deletion wis2box-management/wis2box/storage/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def exists(self, identifier: str) -> bool:
if e.response['Error']['Code'] == '404':
return False
else:
# If any other error occurs, raise an exception or handle it as needed
# If any other error occurs, raise an exception
raise e
except Exception as e:
raise e
Expand Down

0 comments on commit d978cc9

Please sign in to comment.